MCPcopy Index your code
hub / github.com/Python-Markdown/markdown / handleMatch

Method handleMatch

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

503class HtmlInlineProcessor(InlineProcessor):
504 """ Store raw inline html and return a placeholder. """
505 def handleMatch(self, m: re.Match[str], data: str) -> tuple[str, int, int]:
506 """ Store the text of `group(1)` of a pattern and return a placeholder string. """
507 rawhtml = self.backslash_unescape(self.unescape(m.group(1)))
508 place_holder = self.md.htmlStash.store(rawhtml)
509 return place_holder, m.start(0), m.end(0)
510
511 def unescape(self, text: str) -> str:
512 """ 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