M src/wiki/plugins/links/mdx/djangowikilinks.py => src/wiki/plugins/links/mdx/djangowikilinks.py +3 -1
@@ 46,7 46,9 @@ class WikiPathExtension(markdown.extensions.Extension):
WIKI_RE = r"\[(?P<label>[^\]]+?)\]\(wiki:(?P<wikipath>[a-zA-Z0-9\./_-]*?)(?P<fragment>#[a-zA-Z0-9\./_-]*)?\)"
wikiPathPattern = WikiPath(WIKI_RE, self.config, md=md)
wikiPathPattern.md = md
- md.inlinePatterns.add("djangowikipath", wikiPathPattern, "<reference")
+ md.inlinePatterns.register(
+ wikiPathPattern, "djangowikipath", 171
+ )
class WikiPath(markdown.inlinepatterns.Pattern):
M src/wiki/plugins/links/mdx/urlize.py => src/wiki/plugins/links/mdx/urlize.py +4 -1
@@ 164,7 164,10 @@ class UrlizeExtension(markdown.extensions.Extension):
def extendMarkdown(self, md):
""" Replace autolink with UrlizePattern """
- md.inlinePatterns["autolink"] = UrlizePattern(URLIZE_RE, md)
+ # md.inlinePatterns["autolink"] = UrlizePattern(URLIZE_RE, md)
+ md.inlinePatterns.register(
+ UrlizePattern(URLIZE_RE, md), "autolink", 91
+ )
def makeExtension(*args, **kwargs):