Clear footnotes on reset, and prepare for distinct document.
(self)
| 114 | md.postprocessors.register(FootnotePostprocessor(self), 'footnote', 25) |
| 115 | |
| 116 | def reset(self) -> None: |
| 117 | """ Clear footnotes on reset, and prepare for distinct document. """ |
| 118 | self.footnote_order: list[str] = [] |
| 119 | self.footnotes: OrderedDict[str, str] = OrderedDict() |
| 120 | self.unique_prefix += 1 |
| 121 | self.found_refs = {} |
| 122 | self.used_refs = set() |
| 123 | |
| 124 | def unique_ref(self, reference: str, found: bool = False) -> str: |
| 125 | """ Get a unique reference if there are duplicates. """ |