From 99a8168de436c576ec98242d255a71a2b94c9658 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen Date: Thu, 10 Jun 2021 17:30:26 -0400 Subject: [PATCH] Don't inject styles for every call to markdown These styles are already included, so it seems redundant. --- srht/markdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srht/markdown.py b/srht/markdown.py index 839f72d..15c130a 100644 --- a/srht/markdown.py +++ b/srht/markdown.py @@ -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"" + "
" + sanitize(html)