From bbecfb9d88ea4b5908d1cd3b8aa6f2577d23c213 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 4 Dec 2007 19:31:41 +0000 Subject: [PATCH] Fix #358 --- src/libprs500/ebooks/lrf/objects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libprs500/ebooks/lrf/objects.py b/src/libprs500/ebooks/lrf/objects.py index ae9a5b59cb..6b01ac5073 100644 --- a/src/libprs500/ebooks/lrf/objects.py +++ b/src/libprs500/ebooks/lrf/objects.py @@ -730,8 +730,8 @@ class Text(LRFStream): action = TextAttr.tag_map[tag.id] if len(self.content) == 0: current_style = style.copy() - name, val = action[0], LRFObject.tag_to_val(action, None, tag, None) - if current_style[name] != val: + name, val = action[0], LRFObject.tag_to_val(action, self, tag, None) + if name and 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