Skip to content

Extension break comment-out shortcut in html files #2087

Open
@67E9

Description

@67E9

Dear Vscode-ng-language-service Team,

I have found a bug related to commenting out part of html-files in an Angular project using the VSCode shortcut.

bug report

Is this a regression?

Not to my knowledge. I quick search of the issues did not show somehting similar.

Description

When I try to comment out part of an HTML file in an Angular project using the shortcut ctl+/, it adds JS style comment syntax (//) instead of html style comment syntax (<!-- -->).

Bug Type

What does this bug affect

  • Angular Language Service VSCode extension
  • Angular Language Service server

Reproduction

I use the kind of setup:

  1. OS: Windows 11
  2. Source code stored in WSL(Debian)-filesystem
  3. Open project from VSCode with the WSL extension.

Steps to reproduce the behavior:

  1. Open Angular Project stored in WSL-filesystem in VSCode.
  2. Open an HTML file from the project.
  3. Use VSCode shortcut (ctl + numpad / ) to comment out some lines of the HTML.

The issue disappeared, when I disabled the Angular Language Service VSCode extension in VSCode.

Expected behavior

Comment out the lines using <!-- --> syntax.

🌍 Your Environment

Angular Version:


Angular CLI: 17.3.9
Node: 20.11.0
Package Manager: npm 10.2.4
OS: linux x64

Angular: 17.3.12
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1703.9
@angular-devkit/build-angular      17.3.9
@angular-devkit/core               17.3.9
@angular-devkit/schematics         17.3.9
@angular/cdk                       17.3.10
@angular/cli                       17.3.9
@angular/material                  17.3.10
@angular/material-moment-adapter   17.3.10
@schematics/angular                17.3.9
rxjs                               7.5.7
typescript                         5.4.5
zone.js                            0.14.10

Extension Version:


18.2.0

VSCode Version:


1.93.1

Operating System:


Host: Windows 11 Pro 10.0.22631 Build 22631
WSL: 2.2.4.0
Debian(WSL):
  PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
  NAME="Debian GNU/Linux"
  VERSION_ID="11"
  VERSION="11 (bullseye)"
  VERSION_CODENAME=bullseye
  ID=debian

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions