From faf15b2f3d611594352721d4d06407025fea1320 Mon Sep 17 00:00:00 2001 From: ldolse Date: Sat, 11 Sep 2010 13:09:23 +1000 Subject: [PATCH] preprocess merge gone wrong, fixing --- src/calibre/ebooks/conversion/preprocess.py | 25 ++++++--------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/calibre/ebooks/conversion/preprocess.py b/src/calibre/ebooks/conversion/preprocess.py index e2364d961f..24a389e65c 100644 --- a/src/calibre/ebooks/conversion/preprocess.py +++ b/src/calibre/ebooks/conversion/preprocess.py @@ -168,7 +168,6 @@ 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'Ù'), -<<<<<<< TREE (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'ì'), @@ -176,13 +175,6 @@ class HTMLPreProcessor(object): (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'a\s*()*\s*`', re.UNICODE), lambda match: u'à'), - #(re.compile(u'A\s*()*\s*`', re.UNICODE), lambda match: u'À'), - #(re.compile(u'o\s*()*\s*`', re.UNICODE), lambda match: u'ò'), - #(re.compile(u'O\s*()*\s*`', re.UNICODE), lambda match: u'Ò'), -======= ->>>>>>> MERGE-SOURCE - # ´ (re.compile(u'´\s*()*\s*a', re.UNICODE), lambda match: u'á'), (re.compile(u'´\s*()*\s*A', re.UNICODE), lambda match: u'Á'), @@ -218,14 +210,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'Ç'), - -<<<<<<< TREE - # 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: ''), - - # Center separator lines - (re.compile(u'
\s*(?P([*#•]+\s*)+)\s*
'), lambda match: '

\n

' + match.group(1) + '

'), -======= + # ˛ (re.compile(u'˛\s*()*\s*a', re.UNICODE), lambda match: u'ą'), (re.compile(u'˛\s*()*\s*A', re.UNICODE), lambda match: u'Ą'), @@ -235,8 +220,12 @@ 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'Ż'), - ->>>>>>> MERGE-SOURCE + + # 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: ''), + + # Center separator lines + (re.compile(u'
\s*(?P([*#•]+\s*)+)\s*
'), lambda match: '

\n

' + match.group(1) + '

'), # Remove page links (re.compile(r'', re.IGNORECASE), lambda match: ''),