vim-matchup
vim-matchup copied to clipboard
JSX with inner . separator doesn't match closing tag
With the following JSX:
<Layout>
<Layout.Group horizontal center spread>
</Layout.Group>
</Layout>
The %
key will not jump to (or highlight) the closing tag for <Layout>
.
I'm using this with the maxmellon/vim-jsx-pretty
, unsure which is responsible for the issue.
Platform: OSX 10.15.6 Version: MacVim 8.2.539
This is an interesting one. vim-jsx-pretty uses a b:match_words which is subtly broken..
vim-jsx-pretty: <\@<=\([^/][^ \t>]*\)\g{hlend}[^>]*\%(/\@<!>\|$\):<\@<=/\1>
match-up's html: <\@<=\([^/][^ \t>]*\)\g{hlend}\%(>\|$\|[ \t][^>]*\%(>\|$\)\):<\@<=/\1\g{hlend}>
If you try your example in a plain html file, it works.
Works great! Thank you!