Complete footnotes processing in tokenizer

This commit is contained in:
Veronica Berglyd Olsen committed 2024-04-15 18:22:29 +02:00
1 parent 7c4d4dec5c
commit 8d24243d4f
2 files changed
+14 -17

No files matched your search

+2 -2
View File
@@ -1862,8 +1862,8 @@ class GuiDocEditor(QPlainTextEdit):
cursor = self.textCursor()
block = cursor.block()
text = block.text().rstrip()
if not text or text.startswith(("@", "#", "%")):
SHARED.error(self.tr("Footnotes can only be inserted in text."))
if not text or text.startswith("@"):
logger.error("Invalid footnote location")
return
cursor.beginEditBlock()