diff --git a/taiga/mdrender/extensions/autolink.py b/taiga/mdrender/extensions/autolink.py index e09898bf..1b662a27 100644 --- a/taiga/mdrender/extensions/autolink.py +++ b/taiga/mdrender/extensions/autolink.py @@ -37,7 +37,7 @@ class AutolinkExtension(markdown.Extension): * GitHub only accepts URLs with protocols or "www.", whereas Gruber's regex accepts things like "foo.com/bar". """ - def extendMarkdown(self, md, md_globals): + def extendMarkdown(self, md): url_re = r'(?i)\b((?:(?:ftp|https?)://|www\d{0,3}[.])([^\s<>]+))' autolink = AutolinkPattern(url_re, md) md.inlinePatterns.add('gfm-autolink', autolink, '_end') diff --git a/taiga/mdrender/extensions/automail.py b/taiga/mdrender/extensions/automail.py index 7c98520c..8319a8d5 100644 --- a/taiga/mdrender/extensions/automail.py +++ b/taiga/mdrender/extensions/automail.py @@ -19,7 +19,7 @@ class AutomailPattern(markdown.inlinepatterns.Pattern): class AutomailExtension(markdown.Extension): """An extension that turns all email addresses into links.""" - def extendMarkdown(self, md, md_globals): + def extendMarkdown(self, md): mail_re = r'\b(?i)([a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]+)\b' automail = AutomailPattern(mail_re, md) md.inlinePatterns.add('gfm-automail', automail, '_end') diff --git a/taiga/mdrender/extensions/emojify.py b/taiga/mdrender/extensions/emojify.py index 020ba329..d8872579 100644 --- a/taiga/mdrender/extensions/emojify.py +++ b/taiga/mdrender/extensions/emojify.py @@ -152,7 +152,7 @@ EMOJIS_SET = { class EmojifyExtension(Extension): - def extendMarkdown(self, md, md_globals): + def extendMarkdown(self, md): md.registerExtension(self) md.preprocessors.add('emojify', EmojifyPreprocessor(md), diff --git a/taiga/mdrender/extensions/mentions.py b/taiga/mdrender/extensions/mentions.py index d4620449..2b8e88b1 100644 --- a/taiga/mdrender/extensions/mentions.py +++ b/taiga/mdrender/extensions/mentions.py @@ -30,7 +30,7 @@ from markdown.util import etree, AtomicString class MentionsExtension(Extension): - def extendMarkdown(self, md, md_globals): + def extendMarkdown(self, md): MENTION_RE = r"(@)([\w.-]+)" mentionsPattern = MentionsPattern(MENTION_RE) mentionsPattern.md = md diff --git a/taiga/mdrender/extensions/references.py b/taiga/mdrender/extensions/references.py index 6828c739..0457bbe2 100644 --- a/taiga/mdrender/extensions/references.py +++ b/taiga/mdrender/extensions/references.py @@ -36,7 +36,7 @@ class TaigaReferencesExtension(Extension): self.project = project return super().__init__(*args, **kwargs) - def extendMarkdown(self, md, md_globals): + def extendMarkdown(self, md): TAIGA_REFERENCE_RE = r'(?<=^|(?<=[^a-zA-Z0-9-\[]))#(\d+)' referencesPattern = TaigaReferencesPattern(TAIGA_REFERENCE_RE, self.project) referencesPattern.md = md diff --git a/taiga/mdrender/extensions/semi_sane_lists.py b/taiga/mdrender/extensions/semi_sane_lists.py index 3a6c4343..ae9a9c5a 100644 --- a/taiga/mdrender/extensions/semi_sane_lists.py +++ b/taiga/mdrender/extensions/semi_sane_lists.py @@ -28,6 +28,6 @@ class SemiSaneListExtension(markdown.Extension): newlines. """ - def extendMarkdown(self, md, md_globals): + def extendMarkdown(self, md): md.parser.blockprocessors['olist'] = SemiSaneOListProcessor(md.parser) md.parser.blockprocessors['ulist'] = SemiSaneUListProcessor(md.parser) diff --git a/taiga/mdrender/extensions/spaced_link.py b/taiga/mdrender/extensions/spaced_link.py index 7c96dda9..d476f0d2 100644 --- a/taiga/mdrender/extensions/spaced_link.py +++ b/taiga/mdrender/extensions/spaced_link.py @@ -31,7 +31,7 @@ class SpacedLinkExtension(markdown.Extension): extension adds such support. """ - def extendMarkdown(self, md, md_globals): + def extendMarkdown(self, md): md.inlinePatterns["link"] = \ markdown.inlinepatterns.LinkPattern(SPACED_LINK_RE, md) md.inlinePatterns["reference"] = \ diff --git a/taiga/mdrender/extensions/strikethrough.py b/taiga/mdrender/extensions/strikethrough.py index c9517225..3ee8467e 100644 --- a/taiga/mdrender/extensions/strikethrough.py +++ b/taiga/mdrender/extensions/strikethrough.py @@ -14,6 +14,6 @@ class StrikethroughExtension(markdown.Extension): For example: ``~~strike~~``. """ - def extendMarkdown(self, md, md_globals): + def extendMarkdown(self, md): pattern = markdown.inlinepatterns.SimpleTagPattern(STRIKE_RE, 'del') md.inlinePatterns.add('gfm-strikethrough', pattern, '_end') diff --git a/taiga/mdrender/extensions/target_link.py b/taiga/mdrender/extensions/target_link.py index 1f12b66d..1b04b0b2 100644 --- a/taiga/mdrender/extensions/target_link.py +++ b/taiga/mdrender/extensions/target_link.py @@ -28,7 +28,7 @@ from taiga.front.templatetags.functions import resolve class TargetBlankLinkExtension(markdown.Extension): """An extension that add target="_blank" to all external links.""" - def extendMarkdown(self, md, md_globals): + def extendMarkdown(self, md): md.treeprocessors.add("target_blank_links", TargetBlankLinksTreeprocessor(md), "