Parser: Avoid producing <span></span> in the TOC
If someone renames a section but wants old targeted links to still work,
<span id="old-anchor"></span> is the usual solution. And sometimes
people put it inside the section header markup, like
== <span id="old-anchor"></span>New name ==
since putting it before makes it be considered part of the previous section
while putting it after causes the browser to scroll the section header
off the screen.
But this has the unfortunate side effect that the TOC text for that
section will be "<span></span>New name". We should strip that useless
empty span.
Bug: T96153
Change-Id: I47a33ceb79d48f6d0c38fa3b3814a378feb5e31e