From df1ef1a80800b58ae6d818f5bdb0ff919c558d37 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Thu, 29 Nov 2018 15:42:18 +0100 Subject: [PATCH 1/1] fix for empty lines in stanzas --- librarian/epub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- 2.20.1