View Single Post
Old 03-01-2024, 11:20 AM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,676
Karma: 5433388
Join Date: Nov 2009
Device: many
That is quite the mess.

Your screen shot did not show if the first child div of the body tag ends right after the p with the span tag that holds the actual title.

If so you could use regular expression search for that first child div, capture it, extract the title info, then replace that entire first div (and its children) with a much simpler properly formatted single header all in a single pass.

If instead that first child div encompasses the entire body that approach will not work. Then a multiple pass approach is needed and possibly the need to use the Python Function Replace plugin.

If all the Chapter titles are simply an incrementing series, then just the Python Function Replace plugin may be enough.

That structure is so bad though, you may want to strip all that unneeded dross out and reformat the entire thing.

Last edited by KevinH; 03-01-2024 at 11:29 AM.
KevinH is offline   Reply With Quote