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

Class FootnotePostprocessor

markdown/extensions/footnotes.py:497–506  ·  view source on GitHub ↗

Replace placeholders with html entities.

Source from the content-addressed store, hash-verified

495
496
497class FootnotePostprocessor(Postprocessor):
498 """ Replace placeholders with html entities. """
499 def __init__(self, footnotes: FootnoteExtension):
500 self.footnotes = footnotes
501
502 def run(self, text: str) -> str:
503 text = text.replace(
504 FN_BACKLINK_TEXT, self.footnotes.getConfig("BACKLINK_TEXT")
505 )
506 return text.replace(NBSP_PLACEHOLDER, " ")
507
508
509def makeExtension(**kwargs): # pragma: no cover

Callers 1

extendMarkdownMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected