Merge remote-tracking branch 'upstream/master'
authorRobert Błaut <listy@blaut.biz>
Thu, 27 Feb 2014 16:12:17 +0000 (17:12 +0100)
committerRobert Błaut <listy@blaut.biz>
Thu, 27 Feb 2014 16:12:17 +0000 (17:12 +0100)
librarian/epub.py

index 81dcb6e..b17ca0e 100644 (file)
@@ -249,7 +249,7 @@ class TOC(object):
 
             nav_label = nav_map.makeelement(NCXNS('navLabel'))
             text = nav_map.makeelement(NCXNS('text'))
-            text.text = child.name
+            text.text = re.sub(r'\n', ' ', child.name)
             nav_label.append(text)
             nav_point.append(nav_label)
 
@@ -499,7 +499,7 @@ def transform(wldoc, verbose=False,
             '<item id="cover" href="cover.html" media-type="application/xhtml+xml" />'))
         manifest.append(etree.fromstring(
             '<item id="cover-image" href="%s" media-type="%s" />' % (cover_name, bound_cover.mime_type())))
-        spine.insert(0, etree.fromstring('<itemref idref="cover" linear="no" />'))
+        spine.insert(0, etree.fromstring('<itemref idref="cover"/>'))
         opf.getroot()[0].append(etree.fromstring('<meta name="cover" content="cover-image"/>'))
         guide.append(etree.fromstring('<reference href="cover.html" type="cover" title="Okładka"/>'))