Option to merge subsequent tags that are the same
mustafa0x opened this issue · comments
The problem to solve
Given <span>Hello</span> <span>World</span>
or <b>Hello</b> <b>World</b>
it would be nice to optionally merge the tags, so the above becomes <b>Hello World</b>
.
Alternatives
Possible with regex, but not that robust.
This kind of thing is probably better done with cheerio. sanitize-html's scope doesn't extend to building a tree representation of the document.