Reputation: 7025
Working with vim regexes for folding html, trying to ignore html tags that start and end on the same line.
So far, I have
if line =~# '<\(\w\+\).*<\/\1>'
return '='
endif
Which works fine for tags like <a></a>
, but when dealing with custom elements, I run into issues since there is a hyphen in the tag name.
Like for example, this element
<paper-input label="Input label"></paper-input>
What needs to change in the regex to also catch the hyphen?
Upvotes: 2
Views: 427