Fix footnote navigation in viewer

This commit is contained in:
Veronica Berglyd Olsen committed 2024-06-02 23:36:28 +02:00
1 parent 92b7168363
commit 7744ae5912
2 files changed
+8 -1

No files matched your search

+3 -1
View File
@@ -364,8 +364,10 @@ class GuiDocViewer(QTextBrowser):
"""Process a clicked link in the document."""
if link := url.url():
logger.debug("Clicked link: '%s'", link)
if (bits := link.partition("_")) and bits[2]:
if (bits := link.partition("_")) and bits[0] == "#tag" and bits[2]:
self.loadDocumentTagRequest.emit(bits[2], nwDocMode.VIEW)
else:
self.navigateTo(link)
return
@pyqtSlot("QPoint")