Fix #2129 (.prc to MOBI causes TOC links to break)

This commit is contained in:
Kovid Goyal 2009-03-22 10:57:14 -07:00
parent 802385787a
commit af9f8a47a5
2 changed files with 90 additions and 88 deletions

View File

@ -358,6 +358,8 @@ class MobiReader(object):
attrib['style'] = '; '.join(styles) attrib['style'] = '; '.join(styles)
if 'filepos-id' in attrib: if 'filepos-id' in attrib:
attrib['id'] = attrib.pop('filepos-id') attrib['id'] = attrib.pop('filepos-id')
if 'name' in attrib and attrib['name'] != attrib['id']:
attrib['name'] = attrib['id']
if 'filepos' in attrib: if 'filepos' in attrib:
filepos = attrib.pop('filepos') filepos = attrib.pop('filepos')
try: try: