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

Method get_stash

markdown/inlinepatterns.py:538–546  ·  view source on GitHub ↗
(m: re.Match[str])

Source from the content-addressed store, hash-verified

536 return text
537
538 def get_stash(m: re.Match[str]) -> str:
539 id = m.group(1)
540 value = stash.get(id)
541 if value is not None:
542 if isinstance(value, etree.Element):
543 # Ensure we don't have a placeholder inside a placeholder
544 return self.unescape(self.md.serializer(value))
545 else:
546 return r'\%s' % value
547
548 return util.INLINE_PLACEHOLDER_RE.sub(get_stash, text)
549

Callers

nothing calls this directly

Calls 1

unescapeMethod · 0.95

Tested by

no test coverage detected