Minor tweaks in text parsing and highlighting

This commit is contained in:
Veronica K. B. Olsen
2020-06-13 21:14:04 +02:00
parent ff6b4bcfa7
commit bd8a6afd91
3 changed files with 16 additions and 14 deletions
+3 -2
View File
@@ -305,11 +305,12 @@ class NWIndex():
elif aLine.startswith(r"%"):
if nTitle > 0:
toCheck = aLine[1:].lstrip().lower()
toCheck = aLine[1:].lstrip()
synTag = toCheck[:9].lower()
tLen = len(aLine)
cLen = len(toCheck)
cOff = tLen - cLen
if toCheck.startswith("synopsis:"):
if synTag == "synopsis:":
self._indexSynopsis(tHandle, isNovel, aLine[cOff+9:].strip(), nTitle)
# Count words for remaining text after last heading
+3 -2
View File
@@ -327,8 +327,9 @@ class Tokenizer():
tmpMarkdown.append("\n")
elif aLine[0] == "%":
cLine = aLine[1:].strip()
if cLine.lower().startswith("synopsis:"):
cLine = aLine[1:].lstrip()
synTag = cLine[:9].lower()
if synTag == "synopsis:":
self.theTokens.append((
self.T_SYNOPSIS,
nLine,