MagicPython icon indicating copy to clipboard operation
MagicPython copied to clipboard

python string syntax highlight errors

Open alexr00 opened this issue 3 years ago • 2 comments
trafficstars

  • Editor name and version: VS Code 1.62+

  • Platform: Any

  • Color scheme: Any

  • MagicPython version: latest commit from main

  • A sreenshot: image

  • 5-10 lines of surrounding code:

# This is not an f-string, but VSCode highlights `workspaceFolder' like a variable.
a = "${workspaceFolder}"

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

alexr00 avatar Nov 24 '21 12:11 alexr00

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

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

SyzenEinca avatar Mar 04 '22 11:03 SyzenEinca

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

mikisama avatar Mar 11 '22 02:03 mikisama