qcz / vscode-text-power-tools

Text Power Tools extension for VS Code
https://marketplace.visualstudio.com/items?itemName=qcz.text-power-tools
MIT License
95 stars 14 forks source link

[Feature Request] Convert @ to its HTML entity equivalent (@) #81

Closed smfukaya closed 6 months ago

smfukaya commented 7 months ago

Angular 17 brought control flow blocks that starts with @ (e.g.: @if, @for). So, in order to print "@" in HTML template, now we have to convert it to its HTML entity equivalent (@) or we will get:

NG5002: Incomplete block "For". If you meant to write the @ character, you should use the "@" HTML entity instead.

qcz commented 6 months ago

Added Encode HTML entities (all named references) command in 1.46.0 which converts the problematic @, { and } characters to their HTML entity versions (not the numeric version, the proper ones, but they works exactly the same).

smfukaya commented 6 months ago

It worked like a charm! It replaced @ with @ (Commercial At). Thanks very much Dániel Tar!