-
Notifications
You must be signed in to change notification settings - Fork 95
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
custom 'html' tags are in red color #92
Comments
The coloring of 'invalid' elements makes the grammar very hard to use for HTML-derivatives. I'd vote to remove that enhancement again. |
It would be nice to at least have a setting to turn this off, it makes development a lot harder than is necessary. |
It's very annoying see those tags in red color in my NativeScript templates |
Can anybody please remove this enhancement or can anybody tell me how to remove by myself? Can I edit a specific file in the bundle to remove this? |
This "feature" is a pain to my eyes! Please add a setting. |
So what I'm looking at doing to correct this is to add a secondary grammar called "HTML (Derivative)" which allows for any tag name. This maintains the integrity of the proper HTML grammar while allowing for template cases where the tag rules are relaxed. |
This has now been added. The new grammar is exactly the same as the HTML grammar but with the removal of the invalid tag handling. The new tag scoping is retained with a new scope for all tags that would not be valid in a pure HTML context. Unsure if this will get picked up automatically in the next VSCode release or if it will need special handling perhaps @aeschli can talk to that part. |
Instead of requiring a name to match an existing HTML element, this relaxes the restrictions to: - starting with [a-zA-Z] (matching the HTML parser WICG/webcomponents#239 (comment)) - then continuing with anything other than a space, forward slash or closing angle bracket This is similar to the fix to the following issue in the HTML syntax highlighting repo (and actually depends on the "derivative" syntax that was created for that issue): textmate/html.tmbundle#92
is still red, i had to read through 3 closed tickets to get to somewhere I can post that because the original was closed:
https://github.com/microsoft/vscode/issues/59947
Thanks for wasting a lot of my time to find stuff like this because issues is getting real messy. It won't take long before people just stop bothering to report this stuff.
And center is not an invalid tag, just obsolete. But it's just easier to use than adding a style to a div that does the same so it will never go away |
Was this ever fixed three years ago? My |
My center tags are still red too. |
I had to face this issue with This really is an eyesore. |
so,,,, any fixing yet? |
Stil red... |
|
It's because the |
Oh, thanks for pointing it out, I didn't know about this. I'm still fairly new to HTML/CSS as a whole. |
From @VladimirAmiorkov on August 15, 2018 12:24
Steps to Reproduce:
https://github.com/telerik/nativescript-ui-samples-angular/blob/master/listview/app/examples/getting-started/listview-getting-started.component.html) html file or create one with "invalid" html tags
GridLayout
,RadListView
andStackLayout
are coloured bright red as shown in the screenshot bellowDoes this issue occur when all extensions are disabled?: Yes
I see that this is probably an new feature that has been added to show "invalid" html tags as red but in our realm we are developing NativeScript with Angular which includes the creation of our custom html tags which are not part of the standard html tags. Can this be disabled or changed in any way, those tag where not coloured in bright red in the previous version, only in 1.26.0.
Copied from original issue: microsoft/vscode#56467
The text was updated successfully, but these errors were encountered: