From d67cef26119e1c0f1cf532e2da5e5b3d31d4fdf5 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Fri, 3 Nov 2023 00:39:24 +0100 Subject: [PATCH] Fix bug where tags were lost in the index when saving a document --- novelwriter/core/index.py | 2 +- sample/content/f1471bef9f2ae.nwd | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/novelwriter/core/index.py b/novelwriter/core/index.py index 068bb036..05273bae 100644 --- a/novelwriter/core/index.py +++ b/novelwriter/core/index.py @@ -404,7 +404,7 @@ class NWIndex: tagName = tBits[1] self._tagsIndex.add(tagName, tHandle, sTitle, itemClass) self._itemIndex.setHeadingTag(tHandle, sTitle, tagName) - tags[tagName] = True + tags[tagName.lower()] = True else: self._itemIndex.addHeadingRef(tHandle, sTitle, tBits[1:], tBits[0]) diff --git a/sample/content/f1471bef9f2ae.nwd b/sample/content/f1471bef9f2ae.nwd index 8ed84dde..9253d784 100644 --- a/sample/content/f1471bef9f2ae.nwd +++ b/sample/content/f1471bef9f2ae.nwd @@ -1,12 +1,10 @@ %%~name: Space %%~path: 15c4492bd5107/f1471bef9f2ae %%~kind: WORLD/NOTE -%%~hash: bc139a020239c9c0d936aa9d0bcc3644ae2f370c -%%~date: Unknown/2023-08-25 16:52:06 +%%~hash: b08c9796fd9918a87e107bf26606e75341a49ce8 +%%~date: Unknown/2023-11-03 00:36:58 # Space @tag: Space Space … it’s an awful lot of nothing, with bits in it here and there. Some of which, people like to call home. - -