-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Binding syntax outside of an attribute still highlighted as a binding rather than plain text #1725
Comments
This is not a syntax error. Syntactically, this is just a text literal. The blue and white highlighting is the syntax highlighting, which is regex-based. White is a text literal and blue is an attribute. There won't ever be an error for this, but we could investigate how feasible it is to ensure the syntax highlighting gets fixed here. |
Thanks, Andrew! |
Closing in favor of angular/angular#49842 edit: reopening. This one deals with the binding text while the angular/angular issue is for adding a warning/error |
With a negative lookbehind we can exclude binding like text (ie `<div>[myInput]=myvar</div>`) from the synthax coloring of bindings Fixes angular#1725 and angular/angular#49842
With a negative lookbehind we can exclude binding like text (ie `<div>[myInput]=myvar</div>`) from the synthax coloring of bindings Fixes angular#1725 and angular/angular#49842
With a negative lookbehind we can exclude binding like text (ie `<div>[myInput]=myvar</div>`) from the synthax coloring of bindings Fixes angular#1725
I've just come across the same issue. The challenge is that the language is injected into There are a few patterns which are inserted:
If we remove What do you reckon to removing the bindings and letting the default html extension handle these? An alternative option could be to have a second injected grammar which injects into something like |
Hi @a-stewart, that seems reasonable. Would you like to send a PR out for this? |
Sorry for the delay - created #1992 for this. |
Currently we inject all the syntaxes into text.html, causing angular#1725 Rather than doing this, we should separate this into two injects, one injecting interpolation into the base html, and another which injects bindings, but only into meta.tag. fixes angular#1725
Currently we inject all the syntaxes into text.html, causing angular#1725 Rather than doing this, we should separate this into two injects, one injecting interpolation into the base html, and another which injects bindings, but only into meta.tag. fixes angular#1725
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 bug report
Is this a regression?
N/A
Description
A clear and concise description of the problem...If the bug is caused or experienced by a particular source code, please provide a minimal
reproduction of that source code.
Bug Type
What does this bug affect
Angular Language Service VSCode extension
Angular Language Service server
Reproduction
Steps to reproduce the behavior:
Expected behavior
filesArray
property is defined outside the closing arrow of the opening<app-image-img>
element, I would expect the text to turn white as it does when a property without an array is added outside the opening arrow:Logs
N/A - No errors in Angular Server Log or Browser Console
Screenshots
Incorrectly added property tag outside of closing arrow: (unexpected behavior, text is blue.)

Shows white text when non-bracketed property is added: (expected behavior, showing white text)

Correct implementation of property binding: (working properly)

🌍 Your Environment
Angular Version:
Extension Version:
VSCode Version:
Operating System:
Extension options:
Anything else relevant?
N/A
The text was updated successfully, but these errors were encountered: