From: Robert BÅ‚aut Date: Mon, 3 Mar 2014 20:21:43 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: 1.7~99^2~18 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/f26b53f9b72c689f58714b36b31c7e1cdc2dfa2a?hp=08dc6413258e57f1638f8f91feef63d538d9cdbc Merge remote-tracking branch 'upstream/master' --- diff --git a/librarian/epub.py b/librarian/epub.py index b17ca0e..eba59fe 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -310,7 +310,7 @@ def chop(main_text): yield part_xml last_node_part = True main_xml_part[:] = [deepcopy(one_part)] - elif not last_node_part and name in ("naglowek_scena"): + elif not last_node_part and name == "naglowek_scena": yield part_xml main_xml_part[:] = [deepcopy(one_part)] else: @@ -335,7 +335,7 @@ def transform_chunk(chunk_xml, chunk_no, annotations, empty=False, _empty_html_s toc = TOC() for element in chunk_xml[0]: - if element.tag in ("naglowek_czesc"): + if element.tag == "naglowek_czesc": toc.add(node_name(element), "part%d.html#book-text" % chunk_no) elif element.tag in ("naglowek_rozdzial", "naglowek_akt", "srodtytul"): toc.add(node_name(element), "part%d.html" % chunk_no)