Minor tweaks in text parsing and highlighting
This commit is contained in:
+3
-2
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user