fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1df9b49
)
fix epub for weird corner case
author
Jan Szejko
<janek37@gmail.com>
Wed, 6 Jun 2018 14:09:49 +0000
(16:09 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Wed, 6 Jun 2018 14:09:49 +0000
(16:09 +0200)
librarian/epub.py
patch
|
blob
|
history
diff --git
a/librarian/epub.py
b/librarian/epub.py
index
397dc51
..
8d4e73f
100644
(file)
--- a/
librarian/epub.py
+++ b/
librarian/epub.py
@@
-201,10
+201,10
@@
class Stanza(object):
if not text:
return
for i, verse_text in enumerate(re.split(r"/\s*\n", text)):
- if not verse_text.strip():
- continue
if i:
self.open_normal_verse()
+ if not verse_text.strip():
+ continue
verse = self.get_open_verse()
if len(verse):
verse[-1].tail = (verse[-1].tail or "") + verse_text