View Single Post
Old 04-02-2014, 02:47 PM   #588
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
One thing I did for a Sigil plugin (written in Python), that would delete empty spans, was to cycle through storing all the tags and text, giving each a number, and a pir number (initialised at 0), then run through and when it came to an end span, work backward to find the previous unpaired span, then continuing on through to end of file.

Then remove all the empty spans and their end tags, then rewrite the file back in order.

You could do something similar to remove *your* desired spans.

the plugin was in the post here if you want to see what I did. [And see better than how it's worded here ]
Perkin is offline   Reply With Quote