From 8944c7e9847e26536b446800c71fdaf23cf64e81 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 30 Jul 2008 12:33:28 -0700 Subject: [PATCH] Fix handling of EmpLine in lrf2lrs --- src/calibre/ebooks/lrf/objects.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/lrf/objects.py b/src/calibre/ebooks/lrf/objects.py index e071b07f10..29c0d8de44 100644 --- a/src/calibre/ebooks/lrf/objects.py +++ b/src/calibre/ebooks/lrf/objects.py @@ -744,10 +744,9 @@ class Text(LRFStream): self.content.append(self.__class__.TextTag(name)) def empline(self, tag, stream): - def invalid(op): stream.seek(op) - self.simple_container(None, 'EmpLine') + #self.simple_container(None, 'EmpLine') oldpos = stream.tell() try: @@ -770,7 +769,8 @@ class Text(LRFStream): except LRFParseError: stream.seek(oldpos) - self.content.append(self.__class__.TextTag( + if attrs: + self.content.append(self.__class__.TextTag( 'EmpLine', attrs=attrs)) def space(self, tag, stream):