aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/extensions/abbr.py
diff options
context:
space:
mode:
Diffstat (limited to 'markdown/extensions/abbr.py')
-rw-r--r--markdown/extensions/abbr.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/markdown/extensions/abbr.py b/markdown/extensions/abbr.py
index 5e8845b..a3d456f 100644
--- a/markdown/extensions/abbr.py
+++ b/markdown/extensions/abbr.py
@@ -33,7 +33,7 @@ class AbbrExtension(Extension):
def extendMarkdown(self, md, md_globals):
""" Insert AbbrPreprocessor before ReferencePreprocessor. """
- md.preprocessors.add('abbr', AbbrPreprocessor(md), '<reference')
+ md.preprocessors.register(AbbrPreprocessor(md), 'abbr', 12)
class AbbrPreprocessor(Preprocessor):
@@ -51,8 +51,9 @@ class AbbrPreprocessor(Preprocessor):
if m:
abbr = m.group('abbr').strip()
title = m.group('title').strip()
- self.markdown.inlinePatterns['abbr-%s' % abbr] = \
- AbbrInlineProcessor(self._generate_pattern(abbr), title)
+ self.markdown.inlinePatterns.register(
+ AbbrInlineProcessor(self._generate_pattern(abbr), title), 'abbr-%s' % abbr, 2
+ )
# Preserve the line to prevent raw HTML indexing issue.
# https://github.com/Python-Markdown/markdown/issues/584
new_text.append('')