[format.python] based on bugfix in 998ec900

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2022-04-23 09:50:24 +02:00
parent 998ec900cc
commit 86ba4ea189
4 changed files with 36 additions and 32 deletions

View file

@ -77,11 +77,9 @@ class InfoPage:
.. _markdown-it-py: https://github.com/executablebooks/markdown-it-py
"""
return MarkdownIt(
"commonmark", {"typographer": True}
).enable(
["replacements", "smartquotes"]
).render(self.content)
return (
MarkdownIt("commonmark", {"typographer": True}).enable(["replacements", "smartquotes"]).render(self.content)
)
def get_ctx(self): # pylint: disable=no-self-use
"""Jinja context to render :py:obj:`InfoPage.content`"""