Binaryify / OneDark-Pro

Atom's iconic One Dark theme for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme
MIT License
1.5k stars 290 forks source link

Coloring seems wrong for python raw strings #749

Closed Haoyu-UT closed 2 years ago

Haoyu-UT commented 2 years ago

For python raw strings, "\" and following characters are colored as escape characters. It is expected that all characters in raw strings are colored in the same way.

image

Environment:

Binaryify commented 2 years ago

you should use \\cell_b.png

Haoyu-UT commented 2 years ago

r'paper\cell_b.png' == 'paper\\cell_b.png' is evaluated as True in Python. Raw string has "r" before it, and it means string without backslash escape in Python. It's especially useful for handling paths in Windows. Please kindly reconsider this issue.

Binaryify commented 2 years ago

I'm afraid can't fix this now, in vscode, they don't handle raw Strings image image

I will create an issue in the pylance's repo later

Haoyu-UT commented 2 years ago

Thank you for your confirmation. I also noticed that the bug could be related to vscode itself. Let's see if Microsoft developers will eventually fix it. image image

Binaryify commented 2 years ago

yep