DEV Community

Discussion on: How to normalize (join together) bold nodes in HTML DOM?

Collapse
 
jwkicklighter profile image
Jordan Kicklighter

Would be good to do this in a regex that also looks for whitespace between the two tags.

Collapse
 
delixx profile image
DeLiXx

I thought about that as well, but then you'd change the content (if only ever so slightly) for a trivial QoL improvement

Thread Thread
 
jwkicklighter profile image
Jordan Kicklighter

If you use a capture group, you could put every bit of whitepace back.