fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vendor packagers rewrite
[librarian.git]
/
librarian
/
epub.py
diff --git
a/librarian/epub.py
b/librarian/epub.py
index
f2987b5
..
0f23923
100644
(file)
--- a/
librarian/epub.py
+++ b/
librarian/epub.py
@@
-84,13
+84,14
@@
def replace_characters(node):
.replace(",,", u"\u201E")\
.replace('"', u"\u201D")\
.replace("'", u"\u2019")
.replace(",,", u"\u201E")\
.replace('"', u"\u201D")\
.replace("'", u"\u2019")
- if node.tag == 'extra':
+ if node.tag in ('uwaga', 'extra'):
+ t = node.tail
node.clear()
node.clear()
- else:
-
node.text = replace_chars(node.text)
-
node.tail = replace_chars(node.tail)
-
for child in node:
-
replace_characters(child)
+ node.tail = t
+ node.text = replace_chars(node.text)
+ node.tail = replace_chars(node.tail)
+ for child in node:
+ replace_characters(child)
def find_annotations(annotations, source, part_no):
def find_annotations(annotations, source, part_no):
@@
-106,7
+107,7
@@
def find_annotations(annotations, source, part_no):
child.clear()
child.tail = tail
child.text = number
child.clear()
child.tail = tail
child.text = number
- if child.tag not in ('extra',):
+ if child.tag not in ('extra',
'uwaga'
):
find_annotations(annotations, child, part_no)
find_annotations(annotations, child, part_no)