Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Python highlighting - raw string literals incorrectly colour escape sequences in some cases #155
Comments
|
We highlight raw strings with Regexp syntax, that's what original users of tmLanguage schemas in TextMate and SublimeText expected. We can probably compile a special version of MagicPython that wouldn't have this feature, but then you'll get a lot of negative feedback that we broke this feature in VSCode. So as is, this isn't a bug in current MagicPython, it's a feature. |
|
VSCode user here. Please reopen this issue. r'strings' are I know that it is used often in regex. But this feature should be handle differently. At least provide some config, to set it manually. Snippet below doesn't looks like a feature at all. EDIT |




From @akdor1154 on August 30, 2018 0:54
VSCode Insiders Version: 1.27.0-insider 47d0584301d16d4efd6618f6f33ef14099c92561 x64
VSCode Stable Version: 1.26
OS Version: ubuntu 18.04 x64
Steps to Reproduce:
Observe the backslashes are incorrectly shown as being part of an escape sequence. Raw strings literals have literal backslashes, you can't write escape sequences in them. The string should be a solid colour.
\nshould not be highlighted as it is in a raw string, and\Jshould not be highlighted as it's not even an escape sequence in a normal string (normal string highlighting behaves correctly here).Looks like GitHub highlighting gets it wrong too. :)
Copied from original issue: microsoft/vscode#57555