This is necessary because we need to pass the backend in order use some
of the fancy link features.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
import datetime
import feedparser
import html2text
-import markdown
import re
import textile
import unicodedata
def _render_text(self, text, lang="markdown"):
if lang == "markdown":
- return markdown.markdown(text,
+ renderer = wiki.Markdown(
+ self.backend,
extensions=[
wiki.PrettyLinksExtension(),
"codehilite",
"sane_lists",
"tables",
"toc",
- ])
+ ],
+ )
+
+ return renderer.convert(text)
elif lang == "textile":
return textile.textile(text)