mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix #358
This commit is contained in:
parent
227483d9d5
commit
bbecfb9d88
@ -730,8 +730,8 @@ class Text(LRFStream):
|
|||||||
action = TextAttr.tag_map[tag.id]
|
action = TextAttr.tag_map[tag.id]
|
||||||
if len(self.content) == 0:
|
if len(self.content) == 0:
|
||||||
current_style = style.copy()
|
current_style = style.copy()
|
||||||
name, val = action[0], LRFObject.tag_to_val(action, None, tag, None)
|
name, val = action[0], LRFObject.tag_to_val(action, self, tag, None)
|
||||||
if current_style[name] != val:
|
if name and current_style[name] != val:
|
||||||
# No existing Span
|
# No existing Span
|
||||||
if len(self.content) > 0 and isinstance(self.content[-1], self.__class__.Span):
|
if len(self.content) > 0 and isinstance(self.content[-1], self.__class__.Span):
|
||||||
self.content[-1].attrs[name] = val
|
self.content[-1].attrs[name] = val
|
||||||
|
Loading…
x
Reference in New Issue
Block a user