Fix highlighting to correctly highlight things like =='aa'. Given the way highlighting works, this change will break highlighting for statements like

for a in $tags:'aa' rof. I think that strings following operators is far more common than strings following the colon in a for statement.
This commit is contained in:
Charles Haley 2022-01-28 21:32:15 +00:00
parent 2620f6685a
commit 4feecf4863

View File

@ -82,7 +82,7 @@ class TemplateHighlighter(QSyntaxHighlighter):
r"|\b[+-]?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\b",
"number")
a(r"""(?:[^:]'[^']*'|"[^"]*")""", "string")
a(r"""(?<!:)'[^']*'|"[^"]*\"""", "string")
a(r'\(', "lparen")
a(r'\)', "rparen")