~sircmpwn/core.sr.ht

99a8168de436c576ec98242d255a71a2b94c9658 — Tommy Nguyen 5 days ago 9c2110b master 0.67.13
Don't inject styles for every call to markdown

These styles are already included, so it seems redundant.
1 files changed, 1 insertions(+), 1 deletions(-)

M srht/markdown.py
M srht/markdown.py => srht/markdown.py +1 -1
@@ 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)