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

Syntax Highlighting Error #179043

Closed
Wang-Yile opened this issue Mar 31, 2023 · 5 comments
Closed

Syntax Highlighting Error #179043

Wang-Yile opened this issue Mar 31, 2023 · 5 comments
Assignees
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@Wang-Yile
Copy link

Type: Bug

When I wrote a HTML text in VS Code with Python extension,
I found this line:

<span class="comment"># Python 3</span>

has some problems in highlighting syntax.

It expects red because it is in a read-only string.
But, in fact, it is green.
That means the extension thinks it is notes.

I am using Python 3.11.2 (64-bits)

This my code:

_html = r"""
        <!DOCTYPE html>
        <html>
            <head><meta charset="utf-8"></head>
            <body>
                    <span class="comment"># Python 3</span>
            </body>
        </html>
"""

You should copy it into VS Code to see its effect.

Extension version: 2023.7.10901017
VS Code version: Code 1.77.0 (7f329fe, 2023-03-29T10:02:16.981Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i5-12400F (12 x 2496)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 15.79GB (3.91GB free)
Process Argv --crash-reporter-id fc004f5b-7ef2-45d0-a18a-09e9d61149a2
Screen Reader no
VM 50%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vstes627:30244334
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30610679
nodejswelcome1cf:30587006
2e4cg342:30602488
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
vsctsb:30677850
functionswalk:30687959
pythonms35:30701012

@karthiknadig
Copy link
Member

@Wang-Yile Can you provide a screen shot of the issue?

@Wang-Yile
Copy link
Author

image

@eleanorjboyd eleanorjboyd transferred this issue from microsoft/vscode-python Apr 3, 2023
@heejaechang
Copy link

@karthiknadig it should be text mate who is doing this. do you know which repo we need to transfer this issue to?

@karthiknadig
Copy link
Member

@heejaechang It should be VS Code core repo. I will transfer.

@alexr00
Copy link
Member

alexr00 commented Apr 11, 2023

We get our Python syntax highlighting grammar from https://github.com/MagicStack/MagicPython. I've opened MagicStack/MagicPython#257 for this issue.

@alexr00 alexr00 closed this as completed Apr 11, 2023
@alexr00 alexr00 added grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream labels Apr 11, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

5 participants