Would be good to do this in a regex that also looks for whitespace between the two tags.
I thought about that as well, but then you'd change the content (if only ever so slightly) for a trivial QoL improvement
If you use a capture group, you could put every bit of whitepace back.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.