Make a few improvements to regex and remove debug output

This commit is contained in:
Veronica Berglyd Olsen committed 2024-06-01 14:16:05 +02:00
1 parent 987740f7e9
commit d190315909
3 files changed
+5 -7

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"\\B{sym}\\S.*?\\S{sym}\\B")
rxRule.setPatternOptions(QRegExUnicode)
return rxRule