luochen1990 / rainbow

Rainbow Parentheses Improved, shorter code, no level limit, smooth and fast, powerful configuration.
Apache License 2.0
1.78k stars 95 forks source link

[Bug] xml tag rainbow colouring breaks when opening tag contains wrong whitespace #195

Open PlasmaHH opened 1 month ago

PlasmaHH commented 1 month ago

Describe the bug

When an xml opening tag contains an attribute and after that there is some whitespace, then the rainbow colouring does not work

To Reproduce

<a foo="" >
<b>
</b>
</a>

or

<a foo="" 
>
<b>
</b>
</a>

For the first case replaying \>/ with \s*\>/ in the regex for start= works, but for the second there is probably some way that it needs to match over multiple lines

luochen1990 commented 1 month ago

@PlasmaHH The default config is fixed now, can you help to test it?

PlasmaHH commented 1 month ago

@PlasmaHH The default config is fixed now, can you help to test it?

Yes, it works for html. Note that my initial report was about xml where it should be added too and I guess as well in xhtml too