fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9123932
)
[epub, mobi] fix for hanging single letter conjunctions - currenty disabled
author
Robert Błaut
<listy@blaut.biz>
Thu, 30 Jan 2014 09:39:34 +0000
(10:39 +0100)
committer
Robert Błaut
<listy@blaut.biz>
Thu, 30 Jan 2014 09:39:34 +0000
(10:39 +0100)
for future use.
librarian/epub.py
patch
|
blob
|
history
diff --git
a/librarian/epub.py
b/librarian/epub.py
index
6a2b3c5
..
81dcb6e
100644
(file)
--- a/
librarian/epub.py
+++ b/
librarian/epub.py
@@
-78,6
+78,7
@@
def replace_characters(node):
def replace_chars(text):
if text is None:
return None
def replace_chars(text):
if text is None:
return None
+ #text = re.sub(r"(?<=\s\w)\s+", u"\u00a0", text) #fix for hanging single letter conjunctions – for future use.
return text.replace(u"\ufeff", u"")\
.replace("---", u"\u2014")\
.replace("--", u"\u2013")\
return text.replace(u"\ufeff", u"")\
.replace("---", u"\u2014")\
.replace("--", u"\u2013")\