mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix bug in reconstituting NCX @id and @class attributes.
This commit is contained in:
parent
02091a0fa6
commit
7b2064221e
@ -900,9 +900,9 @@ class TOC(object):
|
|||||||
|
|
||||||
def to_ncx(self, parent, depth=1):
|
def to_ncx(self, parent, depth=1):
|
||||||
for node in self.nodes:
|
for node in self.nodes:
|
||||||
id = self.id or unicode(uuid.uuid4())
|
id = node.id or unicode(uuid.uuid4())
|
||||||
attrib = {'id': id, 'playOrder': '0'}
|
attrib = {'id': id, 'playOrder': '0'}
|
||||||
if self.klass:
|
if node.klass:
|
||||||
attrib['class'] = node.klass
|
attrib['class'] = node.klass
|
||||||
point = element(parent, NCX('navPoint'), attrib=attrib)
|
point = element(parent, NCX('navPoint'), attrib=attrib)
|
||||||
label = etree.SubElement(point, NCX('navLabel'))
|
label = etree.SubElement(point, NCX('navLabel'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user