mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
2620f6685a
commit
4feecf4863
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user