tags are now case sensitive, and need to be unique
This commit is contained in:
+11
-6
@@ -240,7 +240,7 @@ class NWIndex():
|
||||
if sKey == "@":
|
||||
return False, theBits, thePos
|
||||
|
||||
theBits.append(sKey.lower())
|
||||
theBits.append(sKey)
|
||||
thePos.append(cPos)
|
||||
cPos += len(sKey) + 1
|
||||
|
||||
@@ -253,7 +253,7 @@ class NWIndex():
|
||||
sVal = cVal.strip()
|
||||
rLen = len(cVal.lstrip())
|
||||
tLen = len(cVal)
|
||||
theBits.append(sVal.lower())
|
||||
theBits.append(sVal)
|
||||
thePos.append(cPos+tLen-rLen)
|
||||
cPos += tLen + 1
|
||||
|
||||
@@ -261,16 +261,21 @@ class NWIndex():
|
||||
|
||||
def checkThese(self, theBits, tItem):
|
||||
|
||||
theBits = [aBit.lower() for aBit in theBits]
|
||||
nBits = len(theBits)
|
||||
isGood = [False]*nBits
|
||||
nBits = len(theBits)
|
||||
isGood = [False]*nBits
|
||||
if nBits == 0:
|
||||
return []
|
||||
|
||||
# If we have a tag, the first value is always OK, rest is ignored
|
||||
if theBits[0] == self.TAG_KEY and nBits > 1:
|
||||
isGood[0] = True
|
||||
isGood[1] = True
|
||||
if theBits[1] in self.tagIndex.keys():
|
||||
if self.tagIndex[theBits[1]][1] == tItem.itemHandle:
|
||||
isGood[1] = True
|
||||
else:
|
||||
isGood[1] = False
|
||||
else:
|
||||
isGood[1] = True
|
||||
return isGood
|
||||
|
||||
# If we're still here, we better check the references
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
## This is the Subtitle
|
||||
|
||||
% Begin Meta
|
||||
@POV: Jane
|
||||
@Char: Jane, John
|
||||
@Location: Earth
|
||||
@pov: Jane
|
||||
@char: Jane, John
|
||||
@location: Earth
|
||||
% End Meta
|
||||
|
||||
Some text here would look good as well, and maybe some "dialogue"?
|
||||
|
||||
@@ -124,3 +124,13 @@ Start: 2019-05-30 19:43:42 End: 2019-05-30 19:43:49 Words: 0
|
||||
Start: 2019-05-30 19:45:34 End: 2019-05-30 19:45:59 Words: 0
|
||||
Start: 2019-05-30 19:53:25 End: 2019-05-30 19:55:00 Words: 0
|
||||
Start: 2019-05-30 19:55:21 End: 2019-05-30 19:56:16 Words: 0
|
||||
Start: 2019-05-30 20:51:36 End: 2019-05-30 20:51:40 Words: 0
|
||||
Start: 2019-05-30 20:51:40 End: 2019-05-30 20:51:45 Words: 0
|
||||
Start: 2019-05-30 20:25:18 End: 2019-05-30 21:55:25 Words: 0
|
||||
Start: 2019-05-30 21:56:09 End: 2019-05-30 21:57:09 Words: 0
|
||||
Start: 2019-05-30 21:57:14 End: 2019-05-30 21:58:29 Words: 0
|
||||
Start: 2019-05-30 21:58:33 End: 2019-05-30 21:58:59 Words: 0
|
||||
Start: 2019-05-30 21:59:33 End: 2019-05-30 22:00:08 Words: 0
|
||||
Start: 2019-05-30 22:00:27 End: 2019-05-30 22:01:18 Words: 0
|
||||
Start: 2019-05-30 22:01:35 End: 2019-05-30 22:01:57 Words: 0
|
||||
Start: 2019-05-30 22:02:05 End: 2019-05-30 22:02:24 Words: 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<novelWriterXML appVersion="0.1.4" fileVersion="1.0" timeStamp="2019-05-30 19:56:16">
|
||||
<novelWriterXML appVersion="0.1.4" fileVersion="1.0" timeStamp="2019-05-30 22:02:24">
|
||||
<project>
|
||||
<name>Sample Project</name>
|
||||
<title>Sample Project</title>
|
||||
@@ -8,7 +8,7 @@
|
||||
</project>
|
||||
<settings>
|
||||
<spellCheck>True</spellCheck>
|
||||
<lastEdited>636b6aa9b697b</lastEdited>
|
||||
<lastEdited>bb2c23b3c42cc</lastEdited>
|
||||
<lastViewed>None</lastViewed>
|
||||
<lastWordCount>558</lastWordCount>
|
||||
<status>
|
||||
@@ -76,7 +76,7 @@
|
||||
<charCount>656</charCount>
|
||||
<wordCount>121</wordCount>
|
||||
<paraCount>5</paraCount>
|
||||
<cursorPos>105</cursorPos>
|
||||
<cursorPos>69</cursorPos>
|
||||
</item>
|
||||
<item handle="bc0cbd2a407f3" order="2" parent="e7ded148d6e4a">
|
||||
<name>New File</name>
|
||||
@@ -126,7 +126,7 @@
|
||||
<charCount>55</charCount>
|
||||
<wordCount>9</wordCount>
|
||||
<paraCount>1</paraCount>
|
||||
<cursorPos>71</cursorPos>
|
||||
<cursorPos>25</cursorPos>
|
||||
</item>
|
||||
<item handle="15c4492bd5107" order="2" parent="None">
|
||||
<name>Locations</name>
|
||||
|
||||
Reference in New Issue
Block a user