Closed Haoyu-UT closed 2 years ago
you should use \\cell_b.png
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.
I'm afraid can't fix this now, in vscode, they don't handle raw Strings
I will create an issue in the pylance's repo later
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.
yep
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.
Environment: