MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / create_element

Method create_element

markdown/extensions/abbr.py:98–103  ·  view source on GitHub ↗

Create an `abbr` element.

(self, title: str, text: str, tail: str)

Source from the content-addressed store, hash-verified

96 super().__init__(md)
97
98 def create_element(self, title: str, text: str, tail: str) -> etree.Element:
99 ''' Create an `abbr` element. '''
100 abbr = etree.Element('abbr', {'title': title})
101 abbr.text = AtomicString(text)
102 abbr.tail = tail
103 return abbr
104
105 def iter_element(self, el: etree.Element, parent: etree.Element | None = None) -> None:
106 ''' Recursively iterate over elements, run regex on text and wrap matches in `abbr` tags. '''

Callers 1

iter_elementMethod · 0.95

Calls 1

AtomicStringClass · 0.85

Tested by

no test coverage detected