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

Method handleMatch

markdown/inlinepatterns.py:525–529  ·  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

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