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