Add tag value for novel docs in Outline and Novel View (#2428)

This commit is contained in:
Veronica Berglyd Olsen
2025-06-24 16:05:59 +02:00
parent 4b5f3c8af8
commit ad2288e2fc
3 changed files with 12 additions and 7 deletions
+3 -1
View File
@@ -342,12 +342,14 @@ class IndexHeading:
##
def getReferences(self) -> dict[str, list[str]]:
"""Extract all references for this heading."""
"""Extract all tags and references for this heading."""
refs = {x: [] for x in nwKeyWords.VALID_KEYS}
for tag, types in self._refs.items():
for keyword in types:
if keyword in refs and (name := self._cache.tags.tagName(tag)):
refs[keyword].append(name)
if tag := self._tag:
refs[nwKeyWords.TAG_KEY] = [self._cache.tags.tagName(tag)]
return refs
def getReferencesByKeyword(self, keyword: str) -> list[str]: