-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Nested Blade Component dot notation issue when parsed by tree-sitter-html #62
Comments
This has nothing to do with nested components, just trying to use the same ending tag as the start: <x-card.title>
</x-card.title>
<!-- This works, just some lsps expect the start tag to match the end -->
<x-card.title>
</x-card> |
@calebdw But in the discussion it seems that there is an issue with tree-sitter-html giving an error even when the start and end tag matches no? Basically the <x-card.title>
</x-card.title> |
Also is this a valid Laravel Blade syntax? never came across it! <x-card.title>
</x-card> |
Ah, by "nested" I thought you were talking about components inside other components: <x-card>
<x-card.title>
</x-card.title>
</x-card> All that happens is a slight parse error in html (it just affects the highlighting of the extra ending)---however, some lsps will not recognize that those are matching tags since they expect the start and end tags to be the same. |
haha my bad! need to rename the title, to avoid confusion! This was also mainly to track possible |
A little late but just to clarify: this is NOT valid syntax.
And yes, I think this is ecaxctly what it boils down to. Also a little gotcha regarding this (don't know if this is relevant for you) but these tags can be self closing too, like this: <x-inputs.button/> |
This syntax does work: <x-card.title>
</x-card> |
Yes it works, but it would not be valid syntax. This would be the equivalent of opening a tag and closing a different one: <p>
</div> To be fair this would "work" because browsers are smart these days, but it's still invalid because it's missing and end tag. |
Bug whereby nested blade components are not parsed correctly via the
tree-sitter-html
see the discussion
Laravel Docs
The text was updated successfully, but these errors were encountered: