mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
17fb07e8aa
commit
1198aaee3c
@ -101,15 +101,15 @@ class LoadParser(handler.ContentHandler):
|
|||||||
self.level = self.level - 1
|
self.level = self.level - 1
|
||||||
# Changed by Kovid to deal with <span> tags with only whitespace
|
# Changed by Kovid to deal with <span> tags with only whitespace
|
||||||
# content.
|
# content.
|
||||||
data = ''.join(self.data)
|
data = q = ''.join(self.data)
|
||||||
tn = getattr(self.curr, 'tagName', '')
|
tn = getattr(self.curr, 'tagName', '')
|
||||||
try:
|
try:
|
||||||
do_strip = not tn.startswith('text:')
|
do_strip = not tn.startswith('text:')
|
||||||
except:
|
except:
|
||||||
do_strip = True
|
do_strip = True
|
||||||
if do_strip:
|
if do_strip:
|
||||||
data = data.strip()
|
q = q.strip()
|
||||||
if data:
|
if q:
|
||||||
self.curr.addText(data, check_grammar=False)
|
self.curr.addText(data, check_grammar=False)
|
||||||
self.data = []
|
self.data = []
|
||||||
self.curr = self.curr.parentNode
|
self.curr = self.curr.parentNode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user