From c414884b77e7b95e278c4577f9dc75ae7f134180 Mon Sep 17 00:00:00 2001 From: ARaspiK Date: Mon, 6 Jul 2020 17:32:47 +0000 Subject: [PATCH] Replace misaka (hoedown) with mistletoe 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 --- gitsrht/blueprints/repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index dca6a94..9672ffb 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -228,7 +228,7 @@ def tree(owner, repo, ref, path): blob_prefix = url_for( 'repo.raw_blob', owner=repo.owner, repo=repo.name, ref=ref, path=os.path.dirname("/".join(path))) - md = markdown(data, ["h1", "h2", "h3", "h4", "h5"], + md = markdown(data, link_prefix=[link_prefix, blob_prefix]) force_source = "view-source" in request.args return render_template("blob.html", view="blob", -- 2.38.4