~sircmpwn/sr.ht-dev

[PATCH paste.sr.ht v10 5/6] Replace misaka (hoedown) with mistletoe

Details
Message ID
<ZGTeAIxyIb2jcl5kmEmKsDGgVhZewmd5PJAhjUVN1wbDesMB209t3rADt95zimne6ErybvLBjY0tQbrXLxb4kDWtRjhY2AJWtggPjDva5is=@protonmail.com>
DKIM signature
pass
Download raw message
Patch: +1 -1
It looked like using hoedown (through misaka), which is very
unmaintained, was leading to a lot of issues (see [0]). This replaces
misaka by mistletoe [1], without losing any functionality (I hope).

This affects the call to 'markdown()', removing the now-redundant
argument for the tag whitelist.

[0]: https://todo.sr.ht/~sircmpwn/sr.ht/20
[1]: https://github.com/miyuchina/mistletoe
---
 pastesrht/filters.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pastesrht/filters.py b/pastesrht/filters.py
index acca3d8..78af5cc 100644
--- a/pastesrht/filters.py
+++ b/pastesrht/filters.py
@@ -60,4 +60,4 @@ def render_markdown(content):
    content, frontmatter = extract_frontmatter(content)
    if frontmatter:
        content = render_frontmatter(frontmatter) + "\n\n" + content
    return markdown(content, ["h1", "h2", "h3", "h4", "h5"])
    return markdown(content)
-- 
2.24.3
Export thread (mbox)