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:
59caaf5
)
fix impovement for IT #3356 - workaround rare problem
author
Robert Błaut
<listy@blaut.biz>
Wed, 5 Mar 2014 13:38:44 +0000
(14:38 +0100)
committer
Robert Błaut
<listy@blaut.biz>
Wed, 5 Mar 2014 13:38:44 +0000
(14:38 +0100)
librarian/epub.py
patch
|
blob
|
history
diff --git
a/librarian/epub.py
b/librarian/epub.py
index
8220ccb
..
8dba5ac
100644
(file)
--- a/
librarian/epub.py
+++ b/
librarian/epub.py
@@
-284,7
+284,10
@@
class TOC(object):
nav_label = nav_map.makeelement(NCXNS('navLabel'))
text = nav_map.makeelement(NCXNS('text'))
nav_label = nav_map.makeelement(NCXNS('navLabel'))
text = nav_map.makeelement(NCXNS('text'))
- text.text = re.sub(r'\n', ' ', child.name)
+ if child.name is not None:
+ text.text = re.sub(r'\n', ' ', child.name)
+ else:
+ text.text = child.name
nav_label.append(text)
nav_point.append(nav_label)
nav_label.append(text)
nav_point.append(nav_label)