~sircmpwn/sr.ht-dev

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

Details
Message ID
<P2H4ix3Qd5irZ9_P6RM5K3WMoGcoSuf6iXnHAYDkBiYSpNymBaCSMf17u7l67JkBGwum0E48YvUGPG8pBnuo9bN3pYI-ggJpbB7FvvnVII0=@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
---
 scmsrht/formatting.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scmsrht/formatting.py b/scmsrht/formatting.py
index e56d072..36ef0ac 100644
--- a/scmsrht/formatting.py
+++ b/scmsrht/formatting.py
@@ -33,7 +33,7 @@ def format_readme(cache_prefix, content_hash, name, content_getter, user_obj,

    basename, ext = os.path.splitext(name)
    if ext in ['.md', '.markdown']:
        html = markdown(raw, ["h1", "h2", "h3", "h4", "h5"],
        html = markdown(raw,
                link_prefix=link_prefix)
    else:
        # Unsupported/unknown markup type.
-- 
2.24.3
Export thread (mbox)