You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Unclosed bracket in triple-quoted raw string breaks highlighting #39
This is basically the same as #37 except for triple-quoted raw strings.
#foo above should be highlighted as a comment. Instead, it and everything else that comes later in the file will get highlighted as if it were a regex. The grammar doesn't see that the raw string got closed at the closing triple-quote, so is happily consuming everything into the string.
The rules for triple-quoted strings use begin/end to make them work over multiple lines. We could fix the single-line case by adding near-duplicate match rules ("match": "r\"\"\"(.*)\"\"\" e.g.). But the multi-line case would still be broken:
I'm not sure how to fix the multi-line case given the way grammars currently work.
Activity
southgate commentedon Jan 13, 2015
Highlighting gets screwy with an open parens
(too. Related?aroben commentedon Jan 14, 2015
Yeah almost certainly the same issue.
pchaigno commentedon Sep 7, 2015
Is it even possible? If it's not, maybe we should fix this instead of supporting regular expressions on several lines in triple-quoted strings?
Fuzl commentedon Sep 16, 2016
Other odd behaviour breaking the block comment :

Without quotes, SELECT (uppercase only) keyword does not break block comments, but seams to trigger formating although inside block comments :


Would it be related ?
Fuzl commentedon Sep 16, 2016
Following #109 I fetched package magicpython and deactivated language-python.
It all works correctly now.
;o)