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

Method handleMatch

markdown/inlinepatterns.py:524–528  ·  view source on GitHub ↗

Store the text of `group(1)` of a pattern and return a placeholder string.

(self, m: re.Match[str], data: str)

Source from the content-addressed store, hash-verified

522class HtmlInlineProcessor(InlineProcessor):
523 """ Store raw inline html and return a placeholder. """
524 def handleMatch(self, m: re.Match[str], data: str) -> tuple[str, int, int]:
525 """ Store the text of `group(1)` of a pattern and return a placeholder string. """
526 rawhtml = self.backslash_unescape(self.unescape(m.group(1)))
527 place_holder = self.md.htmlStash.store(rawhtml)
528 return place_holder, m.start(0), m.end(0)
529
530 def unescape(self, text: str) -> str:
531 """ Return unescaped text given text with an inline placeholder. """

Callers

nothing calls this directly

Calls 3

backslash_unescapeMethod · 0.95
unescapeMethod · 0.95
storeMethod · 0.80

Tested by

no test coverage detected