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
@@ -26,12 +26,12 @@ from __future__ import annotations
import json
import logging
from time import time
from pathlib import Path
from time import time
from novelwriter import CONFIG
from novelwriter.common import formatTimeStamp
from novelwriter.constants import nwHeadFmt, nwKeyWords, nwLabels, nwHtmlUnicode
from novelwriter.constants import nwHeadFmt, nwHtmlUnicode, nwKeyWords, nwLabels
from novelwriter.core.project import NWProject
from novelwriter.core.tokenizer import T_Formats, Tokenizer, stripEscape
@@ -306,7 +306,7 @@ class ToHtml(Tokenizer):
def appendFootnotes(self) -> None:
"""Append the footnotes in the buffer."""
if self._footnotes:
if self._usedNotes:
tags = HTML4_TAGS if self._genMode == self.M_PREVIEW else HTML5_TAGS
footnotes = self._localLookup("Footnotes")