This commit is contained in:
Kovid Goyal 2009-07-19 17:06:05 -06:00
parent 6eb3ad28f7
commit e15c24169c
2 changed files with 2 additions and 20 deletions

View File

@ -2,7 +2,7 @@ __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en'
__appname__ = 'calibre'
__version__ = '0.6.0b14'
__version__ = '0.6.0b15'
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
import re

View File

@ -648,25 +648,6 @@ class MobiWriter(object):
# Commented out because structured docs don't count section changes in nodeCount
# self._HTMLRecords[thisRecord].currentSectionNodeCount += 1
'''
# *** This should check currentSectionNumber, because content could start late
GR's tweaked code for b14
if thisRecord > 0:
# If next article falls into a later record, bump thisRecord
thisRecordPrime = thisRecord
if (offset + length) // RECORD_SIZE > thisRecord :
thisRecordPrime = (offset + length) // RECORD_SIZE
sectionChangesInThisRecord = True
sectionChangedInRecordNumber = thisRecordPrime
self._currentSectionIndex += 1 # <<<
self._HTMLRecords[thisRecordPrime].nextSectionNumber = self._currentSectionIndex
# The following article node opens the nextSection
self._HTMLRecords[thisRecordPrime].nextSectionOpeningNode = myIndex
continue
else :
continue
'''
# *** This should check currentSectionNumber, because content could start late
if thisRecord > 0:
sectionChangesInThisRecord = True
@ -2084,6 +2065,7 @@ class MobiWriter(object):
indxt.write(chr(len(name)) + name) # Write the name
indxt.write(INDXT['article']) # entryType [0x0F | 0xDF | 0xFF | 0x3F]
# This test may be false if author was post-fixed?
hasAuthor = True if self._ctoc_map[index]['authorOffset'] else False
hasDescription = True if self._ctoc_map[index]['descriptionOffset'] else False
initialOffset = offset