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
|
||||
# Changed by Kovid to deal with <span> tags with only whitespace
|
||||
# content.
|
||||
data = ''.join(self.data)
|
||||
data = q = ''.join(self.data)
|
||||
tn = getattr(self.curr, 'tagName', '')
|
||||
try:
|
||||
do_strip = not tn.startswith('text:')
|
||||
except:
|
||||
do_strip = True
|
||||
if do_strip:
|
||||
data = data.strip()
|
||||
if data:
|
||||
q = q.strip()
|
||||
if q:
|
||||
self.curr.addText(data, check_grammar=False)
|
||||
self.data = []
|
||||
self.curr = self.curr.parentNode
|
||||
|
Loading…
x
Reference in New Issue
Block a user