You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Closely-named XML tags are not matched correctly using vue grammar #392
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Hi, the issue might be due to the internal workings of the language-vue, but maybe you can help me understand the internals of this library so I can try to patch language-vue.
When using the Tree-Sitter HTML grammar, the tag matching works properly:
But when I switch the (non-Tree Sitter) grammar to the "Vue component" text.html.vue, the VCard start tag is being matched with the inner VCardTitle end tag:
Does 'bracket-matcher' internally rely on the grammar scope names to find the pairs?
I've added the scopes for the highlighted tags on both screenshots to show that there is a slight difference in the Vue scopes. It is also reminiscent of the various nested-tag bugs reported before (e.g. #320 )
Steps to Reproduce
Write a Vue Component-like text file like this
<VCard>
<VCardTitle>
</VCardTitle>
</VCard>
In Atom, with both the language-vue and bracket-matcher libraries installed, view the file using the 'Vue Component' syntax
The wrong bracket will be matched when the cursor is on the first line "VCard"
Expected behavior:
For this example, the first "VCard" tag is matched with the second on line 4.
Actual behavior:
For this example, the first "VCard" tag is matched with the "VCardTitle" tag on line 3.
Activity