Make the footnote registry per-file

This commit is contained in:
Veronica Berglyd Olsen
2024-04-26 20:12:57 +02:00
parent 52e8ae9cb6
commit b585b8ecd1
5 changed files with 42 additions and 38 deletions
+3 -3
View File
@@ -202,7 +202,7 @@ class ToMarkdown(Tokenizer):
def appendFootnotes(self) -> None:
"""Append the footnotes in the buffer."""
if self._footnotes:
if self._usedNotes:
tags = STD_MD if self._genMode == self.M_STD else EXT_MD
footnotes = self._localLookup("Footnotes")
@@ -232,8 +232,8 @@ class ToMarkdown(Tokenizer):
"""Replace tabs with spaces."""
spaces = spaceChar*nSpaces
self._fullMD = [p.replace("\t", spaces) for p in self._fullMD]
if self._keepMarkdown:
self._allMarkdown = [p.replace("\t", spaces) for p in self._allMarkdown]
if self._keepMD:
self._markdown = [p.replace("\t", spaces) for p in self._markdown]
return
##