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

Class FootnotePostprocessor

markdown/extensions/footnotes.py:480–489  ·  view source on GitHub ↗

Replace placeholders with html entities.

Source from the content-addressed store, hash-verified

478
479
480class FootnotePostprocessor(Postprocessor):
481 """ Replace placeholders with html entities. """
482 def __init__(self, footnotes: FootnoteExtension):
483 self.footnotes = footnotes
484
485 def run(self, text: str) -> str:
486 text = text.replace(
487 FN_BACKLINK_TEXT, self.footnotes.getConfig("BACKLINK_TEXT")
488 )
489 return text.replace(NBSP_PLACEHOLDER, " ")
490
491
492def makeExtension(**kwargs): # pragma: no cover

Callers 1

extendMarkdownMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected