-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Incorrect comment format for HTML #59854
Comments
(Experimental duplicate detection) |
Could you share the text of the HTML file this happens for? |
Hi, @RMacfarlane -
|
Thanks @SFoskitt! I'm able to reproduce the problem using VSCode 1.27.2. It looks like this has already been fixed in the Insider's version of VSCode, 1.28.0. You can download it here: https://code.visualstudio.com/insiders/, or wait for the release later this week. |
It's a grammar / textmate issue. The grammar thinks The problem is that JavaScript grammar is not aware that it is used embedded. The best way would be if HTML includes its own grammar for embedded JavaScript: textmate/html.tmbundle#85 Embedded languages are a known weakness of TextMate. We have #20488 as dept item for this. @SFoskitt I don't see a fix coming for this in the near future. As a workaround you can get things working again by adding a semicolon to the line mentioned: Clsoing this issue as a duplicate of the issues mentioned above. |
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines. Happy Coding! |
Issue Type: Bug
VSCode recognizes this file as HTML but comments appear as Javascript like // instead of using keyboard combo Cmd + / (on Mac). Keyboard mappings in VSCode are verified as "Toggle Line Comment". THE WEIRD PART - it only does this on ONE file. One *.html file.
VS Code version: Code 1.27.2 (f46c4c4, 2018-09-12T07:04:11.329Z)
OS version: Darwin x64 16.7.0
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: