From e2bc69b731434e6929686637ba4cf296632138e2 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 21 Feb 2011 13:08:51 +0100 Subject: [PATCH 1/1] bugfix for with tail --- librarian/epub.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/librarian/epub.py b/librarian/epub.py index f2987b5..a615b7e 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -84,13 +84,10 @@ def replace_characters(node): .replace(",,", u"\u201E")\ .replace('"', u"\u201D")\ .replace("'", u"\u2019") - if node.tag == 'extra': - node.clear() - else: - node.text = replace_chars(node.text) - node.tail = replace_chars(node.tail) - for child in node: - replace_characters(child) + 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): @@ -106,7 +103,7 @@ def find_annotations(annotations, source, part_no): 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) -- 2.20.1