Fix highlighting of multiple dialogue sections

This commit is contained in:
Veronica Berglyd Olsen
2024-06-10 23:50:59 +02:00
parent 0b3488c265
commit 416c580a45
3 changed files with 129 additions and 68 deletions
+3 -1
View File
@@ -1139,7 +1139,9 @@ class Tokenizer(ABC):
# Match Dialogue
if self._rxDialogue:
for regEx, fmtB, fmtE in self._rxDialogue:
if (rxMatch := regEx.match(text, 0)).hasMatch():
rxItt = regEx.globalMatch(text, 0)
while rxItt.hasNext():
rxMatch = rxItt.next()
temp.append((rxMatch.capturedStart(0), 0, fmtB, ""))
temp.append((rxMatch.capturedEnd(0), 0, fmtE, ""))