aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Bertogli <albertito@blitiri.com.ar>2022-08-31 22:07:53 +0200
committerAlberto Bertogli <albertito@blitiri.com.ar>2022-08-31 22:07:53 +0200
commit15547b279664602d524f20630fdb35f5424b0eba (patch)
treebb686b1440676de603facea782c62d13edce8cad
parent9f3df4899fbb736d77ae1ded8104d8a8b83594c6 (diff)
downloadgit-arr-fork-15547b279664602d524f20630fdb35f5424b0eba.zip
utils: Update Markdown local links extension to the new API
The Markdown extension for rewriting local links was using an API that is now deprecated, and as of python-markdown 3.4 it is no longer available. This patch adjusts the code to use the new API which should be available from 3.0 onwards.
-rw-r--r--utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils.py b/utils.py
index 9c2c45a..b19c9d3 100644
--- a/utils.py
+++ b/utils.py
@@ -177,7 +177,7 @@ if markdown:
tag.set("href", new_target)
class RewriteLocalLinksExtension(markdown.Extension):
- def extendMarkdown(self, md, md_globals):
- md.treeprocessors.add(
- "RewriteLocalLinks", RewriteLocalLinks(), "_end"
+ def extendMarkdown(self, md):
+ md.treeprocessors.register(
+ RewriteLocalLinks(), "RewriteLocalLinks", 1000
)