fix for empty lines in stanzas
authorJan Szejko <janek37@gmail.com>
Thu, 29 Nov 2018 14:42:18 +0000 (15:42 +0100)
committerJan Szejko <janek37@gmail.com>
Wed, 19 Dec 2018 13:43:16 +0000 (14:43 +0100)
librarian/epub.py

index 5f017d4..333b56f 100644 (file)
@@ -190,7 +190,7 @@ class Stanza(object):
         tail = self.stanza.tail
         self.stanza.clear()
         self.stanza.tail = tail
-        self.stanza.extend(self.verses)
+        self.stanza.extend(verse for verse in self.verses if verse.text or len(verse) > 0)
 
     def open_normal_verse(self):
         self.open_verse = self.stanza.makeelement("wers_normalny")