surround with tag does not work with dot inside tag name
deviantfero opened this issue · 4 comments
for example, if I try to surround <div></div>
with <Table.Content>
, the following will be the result
<Table.Content>
<div></div>
<Table/>
the expected result would be
<Table.Content>
<div></div>
<Table.Content/>
Yes, I think that it would be nice for evil-surround to behave like you describe.
on the other hand, not to be nitpicky, but the spec says that: "Tag names are used within element start tags and end tags to give the element’s name. HTML elements all have names that only use characters in the range 0–9, a–z, and A–Z".
Is this name you are using allowed? does it really work? because according to the spec, "dots" are not allowed in tag names.
It is used all over in modern JSX libraries like react, here's a example on a couple of frameworks (there should be code samples in those URLs):
It's not a deal-breaker, but it would be really convenient to have this supported
Yes, I see. It would be really useful.
Solved through @deviantfero's PR (#156) in d210e1f