Merge pull request #689 from vkbo/issue688_wrong_tag
Issue #688: Indexing of invalid keywords
This commit is contained in:
+11
-3
@@ -477,9 +477,17 @@ class NWIndex():
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
sTitle = "T%06d" % nTitle
|
sTitle = "T%06d" % nTitle
|
||||||
if sTitle in self._refIndex[tHandle] and theBits[0] != nwKeyWords.TAG_KEY:
|
if sTitle not in self._refIndex[tHandle]:
|
||||||
for aVal in theBits[1:]:
|
return False
|
||||||
self._refIndex[tHandle][sTitle]["tags"].append([nLine, theBits[0], aVal])
|
|
||||||
|
if theBits[0] == nwKeyWords.TAG_KEY:
|
||||||
|
return False
|
||||||
|
|
||||||
|
if theBits[0] not in nwKeyWords.VALID_KEYS:
|
||||||
|
return False
|
||||||
|
|
||||||
|
for aVal in theBits[1:]:
|
||||||
|
self._refIndex[tHandle][sTitle]["tags"].append([nLine, theBits[0], aVal])
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user