Replace placeholders with html entities.
| 488 | |
| 489 | |
| 490 | class FootnotePostprocessor(Postprocessor): |
| 491 | """ Replace placeholders with html entities. """ |
| 492 | def __init__(self, footnotes: FootnoteExtension): |
| 493 | self.footnotes = footnotes |
| 494 | |
| 495 | def run(self, text: str) -> str: |
| 496 | text = text.replace( |
| 497 | FN_BACKLINK_TEXT, self.footnotes.getConfig("BACKLINK_TEXT") |
| 498 | ) |
| 499 | return text.replace(NBSP_PLACEHOLDER, " ") |
| 500 | |
| 501 | |
| 502 | def makeExtension(**kwargs): # pragma: no cover |