From 6bdc9e7f1fa628a28d0ace8165b2daa4a8afeda4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Trifir=C3=B2?= Date: Fri, 8 Apr 2022 14:42:17 +0200 Subject: [PATCH 1/2] docs: fix requirements.txt url for jsmin --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index f763c36..d18b194 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ mkdocs-material -git+git://github.com/iterative/jsmin@python3-only#egg=jsmin +git+https://github.com/iterative/jsmin@python3-only#egg=jsmin mkdocs-minify-plugin pydoc-markdown>=4 pygments From 654589402927bbe96aa9acfce89e58926c9a9f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Trifir=C3=B2?= Date: Fri, 8 Apr 2022 15:53:29 +0200 Subject: [PATCH 2/2] fix re.sub usage for docstring processing --- docs/pydoc_markdown_shtab.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/pydoc_markdown_shtab.py b/docs/pydoc_markdown_shtab.py index 2883f85..c0d3519 100644 --- a/docs/pydoc_markdown_shtab.py +++ b/docs/pydoc_markdown_shtab.py @@ -8,6 +8,10 @@ def _process(self, node): if not getattr(node, "docstring", None): return super()._process(node) # convert parameter lists to markdown list - node.docstring = re.sub(r"^(\w+)\s{2,}(:.*?)$", r"* __\1__*\2* ", node.docstring, - flags=re.M) + node.docstring.content = re.sub( + r"^(\w+)\s{2,}(:.*?)$", + r"* __\1__*\2* ", + node.docstring.content, + flags=re.M, + ) return super()._process(node)