~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH core.sr.ht] Don't inject styles for every call to markdown

Details
Message ID
<20210610213025.23546-1-remyabel@gmail.com>
DKIM signature
pass
Download raw message
Patch: +1 -1
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"<style>{style}</style>"
                + "<div class='markdown'>"
                + sanitize(html)
-- 
2.31.1
Details
Message ID
<CC09C4HGQAG0.72F35GYS9V8E@taiga>
In-Reply-To
<20210610213025.23546-1-remyabel@gmail.com> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
Thanks!

To git@git.sr.ht:~sircmpwn/core.sr.ht
   99a8168..9c2110b  master -> master

[core.sr.ht/patches] build success

builds.sr.ht
Details
Message ID
<CC09F2WRMYF8.1XB7FSEDDDB18@cirno>
In-Reply-To
<20210610213025.23546-1-remyabel@gmail.com> (view parent)
DKIM signature
missing
Download raw message
core.sr.ht/patches: SUCCESS in 4m27s

[Don't inject styles for every call to markdown][0] from [Tommy Nguyen][1]

[0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/23244
[1]: mailto:remyabel@gmail.com

✓ #523267 SUCCESS core.sr.ht/patches/debian.yml    https://builds.sr.ht/~sircmpwn/job/523267
✓ #523265 SUCCESS core.sr.ht/patches/alpine.yml    https://builds.sr.ht/~sircmpwn/job/523265
✓ #523266 SUCCESS core.sr.ht/patches/archlinux.yml https://builds.sr.ht/~sircmpwn/job/523266
Reply to thread Export thread (mbox)