Drop redundant re.UNICODE flag

This commit is contained in:
Veronica Berglyd Olsen
2025-07-04 20:20:48 +02:00
parent 5ee362dcf4
commit 9af498d69a
4 changed files with 18 additions and 20 deletions
+4 -4
View File
@@ -139,7 +139,7 @@ class GuiDocHighlighter(QSyntaxHighlighter):
# Multiple or Trailing Spaces
if CONFIG.showMultiSpaces:
rxRule = re.compile(r"[ ]{2,}|[ ]*$", re.UNICODE)
rxRule = re.compile(r"[ ]{2,}|[ ]*$")
hlRule = {
0: self._hStyles["mspaces"],
}
@@ -148,7 +148,7 @@ class GuiDocHighlighter(QSyntaxHighlighter):
self._cmnRules.append((rxRule, hlRule))
# Non-Breaking Spaces
rxRule = re.compile(f"[{nwUnicode.U_NBSP}{nwUnicode.U_THNBSP}]+", re.UNICODE)
rxRule = re.compile(f"[{nwUnicode.U_NBSP}{nwUnicode.U_THNBSP}]+")
hlRule = {
0: self._hStyles["nobreak"],
}
@@ -226,7 +226,7 @@ class GuiDocHighlighter(QSyntaxHighlighter):
self._cmnRules.append((rxRule, hlRule))
# Alignment Tags
rxRule = re.compile(r"(^>{1,2}|<{1,2}$)", re.UNICODE)
rxRule = re.compile(r"(^>{1,2}|<{1,2}$)")
hlRule = {
1: self._hStyles["markup"],
}
@@ -234,7 +234,7 @@ class GuiDocHighlighter(QSyntaxHighlighter):
self._txtRules.append((rxRule, hlRule))
# Auto-Replace Tags
rxRule = re.compile(r"<(\S+?)>", re.UNICODE)
rxRule = re.compile(r"<(\S+?)>")
hlRule = {
0: self._hStyles["replace"],
}