Replace placeholders with html entities.
| 478 | |
| 479 | |
| 480 | class 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 | |
| 492 | def makeExtension(**kwargs): # pragma: no cover |