Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong raw string literal highlighting #2445

Closed
gaudat opened this issue Aug 24, 2018 · 1 comment
Closed

Wrong raw string literal highlighting #2445

gaudat opened this issue Aug 24, 2018 · 1 comment

Comments

@gaudat
Copy link

gaudat commented Aug 24, 2018

Environment data

  • VS Code version: 1.26.1
  • Extension version (available under the Extensions sidebar): 2018.7.1
  • OS and version: Windows 10 64-bit, build 17134
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.3, Anaconda 4.2.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A

Actual behavior

Backslashes are highlighted as escape characters when a raw string wrapped with lower case r"" but not upper case R"".

image

Expected behavior

Backslashes should not be highlighted as escape characters.

Steps to reproduce:

  1. Type
big_r = R"C:\Users\me\"
small_r = r"C:\Users\me\"

on a new file with Python code highlighting.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

(Nothing)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

 INFO standard startup Object
console.ts:136 [Extension Host] activating extension
console.ts:136 [Extension Host] Starting express server on port: 1136
console.ts:136 [Extension Host] using C:/Users/anon/.vscode/extensions/vsciot-vscode.vscode-arduino-0.2.20/vendor/node-usb-native/lib/native/usb-native_win32_2.0.2_x64.node
console.ts:136 [Extension Host] Python Extension: Failed to get conda environment list from conda Error: spawn conda ENOENT
	at _errnoException (util.js:1024:11)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
	at onErrorNT (internal/child_process.js:372:16)
	at _combinedTickCallback (internal/process/next_tick.js:138:11)
	at process._tickCallback (internal/process/next_tick.js:180:9)
@brettcannon
Copy link
Member

We actually don't provide the syntax highlighting, VS Code does. And they get their highlighting from https://github.com/MagicStack/MagicPython, so it would be best to report it to them.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants