Alternately, capture the entire first p tag with span child and replace it with a proper h2 tag and proper contents in pass 1.
In pass 2, delete the previously existing earlier h2 tag, using either regular expressions or the nice TagMechanic plugin for Sigil.
May need a third pass to remove leftover/broken div pieces.
Once you have h2 tags with the correct info, you can rebuild the entire TableOfContents using Sigil's menus.
My AccessAide plugin can then be used to take proper TOC headers to backfill in any *empty* title tags in head. You can empty the crap out of them using a normal find and replace before running that plugin.
Last edited by KevinH; 03-01-2024 at 11:40 AM.
|