MagicStack / MagicPython

Cutting edge Python syntax highlighter for Sublime Text, Atom and Visual Studio Code. Used by GitHub to highlight your Python code!
MIT License
1.41k stars 91 forks source link

python string syntax highlight errors #245

Open alexr00 opened 3 years ago

alexr00 commented 3 years ago

Originally filed by @mikisama in https://github.com/microsoft/vscode/issues/137694

SyzenEinca commented 2 years ago

This is for the .format() method, I think? like:

a = "{key}".format(key="something")
mikisama commented 2 years ago

This is for the .format() method, I think? like:

a = "{key}".format(key="something")

Hi, @SyzenEinca It's not for the .format() method. I use python to generate some configuration. Then I found this python string syntax highlight errors.

paths = [
    'OLD_PREFIX/include',
    'OLD_PREFIX/inc',
]

paths = [i.replace('OLD_PREFIX', '${workspaceFolder}') for i in paths]

print(paths)

image