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

Method get_stash

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

unescapeMethod · 0.95

Tested by

no test coverage detected