Don't inject styles for every call to markdown

These styles are already included, so it seems redundant.
This commit is contained in:
Tommy Nguyen 2021-06-10 17:30:26 -04:00 committed by Drew DeVault
parent 9c2110b8f7
commit 99a8168de4
1 changed files with 1 additions and 1 deletions

View File

@ -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)