From: Jan Szejko Date: Thu, 29 Nov 2018 14:42:18 +0000 (+0100) Subject: fix for empty lines in stanzas X-Git-Tag: 1.7~5 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/df1ef1a80800b58ae6d818f5bdb0ff919c558d37?ds=inline;hp=1fdd33e6b409ee5c034915d121f773f007b95b9f fix for empty lines in stanzas --- diff --git a/librarian/epub.py b/librarian/epub.py index 5f017d4..333b56f 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -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")