Add dialogue processing to the tokenizer

This commit is contained in:
Veronica Berglyd Olsen committed 2024-06-01 13:34:59 +02:00
1 parent 388141aae6
commit 2e143071d9
2 files changed
+51 -11

No files matched your search

+1 -1
View File
@@ -96,7 +96,7 @@ class RegExPatterns:
def narratorBreak(self) -> QRegularExpression:
"""Dialogue narrator break rule based on user settings."""
sym = QRegularExpression.escape(CONFIG.narratorBreak)
rxRule = QRegularExpression(f"({sym}\\b)(.*?)(\\b{sym})")
rxRule = QRegularExpression(f"{sym}\\b.*?\\b{sym}")
rxRule.setPatternOptions(QRegExUnicode)
return rxRule