mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
LRF Input: Workaround for broken LRF files from BookDesigner that have incomplete TextStyle elements
This commit is contained in:
parent
e98ce20b0d
commit
a7bf3105ed
1 changed files with 2 additions and 1 deletions
|
|
@ -854,7 +854,8 @@ def find_first_tag(start):
|
|||
if len(self.content) == 0:
|
||||
current_style = style.copy()
|
||||
name, val = action[0], LRFObject.tag_to_val(action, self, tag, None)
|
||||
if name and current_style[name] != val:
|
||||
if name and (name not in current_style or current_style[name]
|
||||
!= val):
|
||||
# No existing Span
|
||||
if len(self.content) > 0 and isinstance(self.content[-1], self.__class__.Span):
|
||||
self.content[-1].attrs[name] = val
|
||||
|
|
|
|||
Loading…
Reference in a new issue