From 2e420f75b3c07ec90275fbe11ae4a10b35dda8cb Mon Sep 17 00:00:00 2001 From: Grigorii Smirnov-Pinchukov Date: Wed, 13 May 2020 10:00:06 +0200 Subject: [PATCH 1/4] Add reSt :param: :returns: replacement for Google helper --- pdoc/html_helpers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pdoc/html_helpers.py b/pdoc/html_helpers.py index 47f7975f..d46155bd 100644 --- a/pdoc/html_helpers.py +++ b/pdoc/html_helpers.py @@ -237,6 +237,9 @@ def google(text): Convert `text` in Google-style docstring format to Markdown to be further converted later. """ + text = text.replace(":param", "\nArgs:\n ", 1) + text = text.replace(":param", " ") + text = text.replace(":return:", "\n\nReturns:") def googledoc_sections(match): section, body = match.groups('') if not body: From 5ec1256e2e423dbd852e8368ff6dcf2771ead190 Mon Sep 17 00:00:00 2001 From: Grigorii Smirnov-Pinchukov Date: Wed, 13 May 2020 10:07:11 +0200 Subject: [PATCH 2/4] Add whitespace to trigger travis --- pdoc/html_helpers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pdoc/html_helpers.py b/pdoc/html_helpers.py index d46155bd..929b9992 100644 --- a/pdoc/html_helpers.py +++ b/pdoc/html_helpers.py @@ -129,6 +129,7 @@ class _ToMarkdown: — they are all perfect!) an insta-preview tool such as RegEx101.com will come in handy. """ + @staticmethod def _deflist(name, type, desc): """ From d01702d0a480c1c2c5f109c76cc1182aacd77825 Mon Sep 17 00:00:00 2001 From: Grigorii Smirnov-Pinchukov Date: Wed, 13 May 2020 10:38:41 +0200 Subject: [PATCH 3/4] Add whitespace to trigger travis --- pdoc/html_helpers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pdoc/html_helpers.py b/pdoc/html_helpers.py index 929b9992..d43147dc 100644 --- a/pdoc/html_helpers.py +++ b/pdoc/html_helpers.py @@ -241,6 +241,7 @@ def google(text): text = text.replace(":param", "\nArgs:\n ", 1) text = text.replace(":param", " ") text = text.replace(":return:", "\n\nReturns:") + def googledoc_sections(match): section, body = match.groups('') if not body: From 840cf93107d74bae22533e798cdf6b08c3e8e360 Mon Sep 17 00:00:00 2001 From: Grigorii Smirnov-Pinchukov Date: Wed, 13 May 2020 10:45:05 +0200 Subject: [PATCH 4/4] Fix whitespaces --- pdoc/html_helpers.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pdoc/html_helpers.py b/pdoc/html_helpers.py index d43147dc..48baa4de 100644 --- a/pdoc/html_helpers.py +++ b/pdoc/html_helpers.py @@ -129,7 +129,6 @@ class _ToMarkdown: — they are all perfect!) an insta-preview tool such as RegEx101.com will come in handy. """ - @staticmethod def _deflist(name, type, desc): """