From 2a906184ad4c56d3018806c03bf2647bd8ecc242 Mon Sep 17 00:00:00 2001 From: ldolse Date: Sat, 11 Sep 2010 13:17:21 +1000 Subject: [PATCH] preprocess merge gone wrong, merged original accent code back --- src/calibre/ebooks/conversion/preprocess.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/calibre/ebooks/conversion/preprocess.py b/src/calibre/ebooks/conversion/preprocess.py index 24a389e65c..f2b19efa9b 100644 --- a/src/calibre/ebooks/conversion/preprocess.py +++ b/src/calibre/ebooks/conversion/preprocess.py @@ -168,13 +168,7 @@ class HTMLPreProcessor(object): (re.compile(u'`\s*()*\s*O', re.UNICODE), lambda match: u'Ò'), (re.compile(u'`\s*()*\s*u', re.UNICODE), lambda match: u'ù'), (re.compile(u'`\s*()*\s*U', re.UNICODE), lambda match: u'Ù'), - (re.compile(u'`\s*()*\s*e', re.UNICODE), lambda match: u'è'), - (re.compile(u'`\s*()*\s*E', re.UNICODE), lambda match: u'È'), - (re.compile(u'`\s*()*\s*i', re.UNICODE), lambda match: u'ì'), - (re.compile(u'`\s*()*\s*I', re.UNICODE), lambda match: u'Ì'), - (re.compile(u'`\s*()*\s*a', re.UNICODE), lambda match: u'à'), - (re.compile(u'`\s*()*\s*A', re.UNICODE), lambda match: u'À'), - + # ´ (re.compile(u'´\s*()*\s*a', re.UNICODE), lambda match: u'á'), (re.compile(u'´\s*()*\s*A', re.UNICODE), lambda match: u'Á'), @@ -210,7 +204,7 @@ class HTMLPreProcessor(object): # ¸ (re.compile(u'¸\s*()*\s*c', re.UNICODE), lambda match: u'ç'), (re.compile(u'¸\s*()*\s*C', re.UNICODE), lambda match: u'Ç'), - + # ˛ (re.compile(u'˛\s*()*\s*a', re.UNICODE), lambda match: u'ą'), (re.compile(u'˛\s*()*\s*A', re.UNICODE), lambda match: u'Ą'), @@ -221,6 +215,7 @@ class HTMLPreProcessor(object): (re.compile(u'˙\s*()*\s*z', re.UNICODE), lambda match: u'ż'), (re.compile(u'˙\s*()*\s*Z', re.UNICODE), lambda match: u'Ż'), + # If pdf printed from a browser then the header/footer has a reliable pattern (re.compile(r'((?<=)\s*file:////?[A-Z].*
|file:////?[A-Z].*
(?=\s*
))', re.IGNORECASE), lambda match: ''),