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

Class AbbrPattern

markdown/extensions/abbr.py:77–88  ·  view source on GitHub ↗

Abbreviation inline pattern.

Source from the content-addressed store, hash-verified

75
76
77class AbbrPattern(markdown.inlinepatterns.Pattern):
78 """ Abbreviation inline pattern. """
79
80 def __init__(self, pattern, title):
81 markdown.inlinepatterns.Pattern.__init__(self, pattern)
82 self.title = title
83
84 def handleMatch(self, m):
85 abbr = etree.Element('abbr')
86 abbr.text = m.group('abbr')
87 abbr.set('title', self.title)
88 return abbr
89
90def makeExtension(configs=None):
91 return AbbrExtension(configs=configs)

Callers 1

runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected