View Single Post
Old 04-07-2014, 12:38 PM   #626
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: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
I also meant to say regarding the non self-closing tags.
IIRC A lot of the elif's were to reduce length of processing time in pairing routine, be removing a lot of the elements needed to check, those (HR BR IMG) as you say should be self closing

The previous elif would be catching the non-self-closing tags but not the end tag, thus causing the mismatch (which you probably realise)

One way to change it to not catch them would be add a 1 and a space to each of the tests...
Code:
elif entity[:4] == '<hr ' or entity[:4] == '<br ' or entity[:5] == '<img ':
    this_entity.e_type = 3
Edit: But the elif with the '/>' would be catching them anyway.

Last edited by Perkin; 04-07-2014 at 12:42 PM.
Perkin is offline   Reply With Quote