MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / AbbrExtension

Class AbbrExtension

markdown/extensions/abbr.py:32–37  ·  view source on GitHub ↗

Abbreviation Extension for Python-Markdown.

Source from the content-addressed store, hash-verified

30ABBR_REF_RE = re.compile(r'[*]\[(?P<abbr>[^\]]*)\][ ]?:\s*(?P<title>.*)')
31
32class AbbrExtension(markdown.Extension):
33 """ Abbreviation Extension for Python-Markdown. """
34
35 def extendMarkdown(self, md, md_globals):
36 """ Insert AbbrPreprocessor before ReferencePreprocessor. """
37 md.preprocessors.add('abbr', AbbrPreprocessor(md), '<reference')
38
39
40class AbbrPreprocessor(markdown.preprocessors.Preprocessor):

Callers 1

makeExtensionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected