MOBI Ouput: Fix :first-letter applied to elements containing a comment causing conversion to fail

This commit is contained in:
Kovid Goyal 2015-04-24 07:44:10 +05:30
parent 4c5513f798
commit 63a2f3c21e

View File

@ -194,7 +194,7 @@ class Stylizer(object):
from lxml.builder import ElementMaker
E = ElementMaker(namespace=XHTML_NS)
for elem in matches:
for x in elem.iter():
for x in elem.iter('*'):
if x.text:
punctuation_chars = []
text = unicode(x.text)