Is it important that the tags don't get any additional formatting? (I would qualify it as "neat" rather than "crucial" but then again, "working neatly" is important IMO.)
@Jongware – that is a crucial point. "Tagging" a formatted text with text like <i> … </i> usually means that the text is used unformatted at a future step in the workflow. So it really doesn't matter, if the closing tag is formatted or not…
Let's see what the OP has to say…
Uwe