Complete footnotes processing in tokenizer

This commit is contained in:
Veronica Berglyd Olsen
2024-04-15 18:22:29 +02:00
parent 7c4d4dec5c
commit 8d24243d4f
2 changed files with 14 additions and 17 deletions
+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()