From 8cf62f9feb609e1ec0297bd28da4a9b0e67b1be3 Mon Sep 17 00:00:00 2001 From: Sengian Date: Sat, 15 Jan 2011 21:51:37 +0100 Subject: [PATCH] Remove empty tags in info --- src/calibre/ebooks/rtf2xml/info.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/calibre/ebooks/rtf2xml/info.py b/src/calibre/ebooks/rtf2xml/info.py index 9f2905f31b..f5f1c5851c 100755 --- a/src/calibre/ebooks/rtf2xml/info.py +++ b/src/calibre/ebooks/rtf2xml/info.py @@ -15,7 +15,7 @@ # # # # ######################################################################### -import sys, os, tempfile +import sys, os, tempfile, re from calibre.ebooks.rtf2xml import copy @@ -51,6 +51,7 @@ class Info: """ self.__text_string = '' self.__state = 'before_info_table' + self.rmspace = re.compile(r'\s+') self.__state_dict = { 'before_info_table': self.__before_info_table_func, 'after_info_table': self.__after_info_table_func, @@ -167,11 +168,13 @@ class Info: """ if self.__token_info == 'mi