Don't inject styles for every call to markdown
These styles are already included, so it seems redundant.
This commit is contained in:
parent
9c2110b8f7
commit
99a8168de4
|
@ -197,7 +197,7 @@ def markdown(text, baselevel=1, link_prefix=None, with_styles=True):
|
|||
html = renderer.render(m.Document(text))
|
||||
formatter = HtmlFormatter()
|
||||
if with_styles:
|
||||
style = formatter.get_style_defs('.highlight') + " .highlight { background: inherit; }"
|
||||
style = ".highlight { background: inherit; }"
|
||||
return Markup(f"<style>{style}</style>"
|
||||
+ "<div class='markdown'>"
|
||||
+ sanitize(html)
|
||||
|
|
Loading…
Reference in New Issue