Fix dialogue highlighting inconsistency (#2299)

This commit is contained in:
Veronica Berglyd Olsen
2025-04-17 16:49:51 +02:00
committed by GitHub
+1 -1
View File
@@ -393,7 +393,7 @@ class GuiDocHighlighter(QSyntaxHighlighter):
else: # Text Paragraph else: # Text Paragraph
self.setCurrentBlockState(BLOCK_TEXT) self.setCurrentBlockState(BLOCK_TEXT)
hRules = self._txtRules if self._isNovel else self._minRules hRules = self._txtRules if self._isNovel else self._minRules
if self._dialogParser.enabled: if self._isNovel and self._dialogParser.enabled:
for pos, end in self._dialogParser(text): for pos, end in self._dialogParser(text):
length = end - pos length = end - pos
self.setFormat(pos, length, self._hStyles["dialog"]) self.setFormat(pos, length, self._hStyles["dialog"])