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

Method attributeCallback

markdown/extensions/legacy_attrs.py:60–61  ·  view source on GitHub ↗
(match: re.Match[str])

Source from the content-addressed store, hash-verified

58 def handleAttributes(self, el: etree.Element, txt: str) -> str:
59 """ Set attributes and return text without definitions. """
60 def attributeCallback(match: re.Match[str]):
61 el.set(sanitize_name(match.group(1)), match.group(2).replace('\n', ' '))
62 return ATTR_RE.sub(attributeCallback, txt)
63
64

Callers

nothing calls this directly

Calls 2

sanitize_nameFunction · 0.90
setMethod · 0.80

Tested by

no test coverage detected