Python Raw String with Escape character bad color coding

Sylvain Berger 9 year бұрын updated by Jindřich Vavruška 7 year бұрын 1
When declaring a raw string in python using this method:
a - r'This\is\a\stupid\windows\path\with\backslashes'

All the backslash and the following letters gets a different color coding.

It would be great if the raw string would totally ignore the escaping characters and gets color coded as a string


It is not color coding, it is wrong interpretation in editor.

When you type this:

    myDir = os.path.join( r'C:\RootOfAllEvil\', 'myfile.txt' )

then editor interprets the string as "C:\RootOfAllEvil', " and the rest of the line is broken (and \R is highlighted as invalid escape).

Obviously, Sublime Text has never heard of raw strings in python. For me it is unusable, as I do quite a lot of python programming.