mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-11 17:53:29 +01:00
Fixed MOBI indexing for mixed case
This commit is contained in:
parent
28d5317c8f
commit
1c7d7ae2d5
1 changed files with 2 additions and 1 deletions
|
|
@ -2512,6 +2512,7 @@ def generateSortTitle(self, title):
|
|||
|
||||
for (i,word) in enumerate(title_words):
|
||||
# Leading numbers optionally translated to text equivalent
|
||||
# Capitalize leading sort word
|
||||
if i==0:
|
||||
if self.opts.numbers_as_text and re.search('[0-9]+',word):
|
||||
translated.append(EPUB_MOBI.NumberToText(word).text.capitalize())
|
||||
|
|
@ -2529,7 +2530,7 @@ def generateSortTitle(self, title):
|
|||
word = '%10.2f' % float(re.sub('[^\d\.]','.',word))
|
||||
except:
|
||||
word = '%10.2f' % float(EPUB_MOBI.NumberToText(word).number_as_float)
|
||||
translated.append(word)
|
||||
translated.append(word.capitalize())
|
||||
else:
|
||||
if re.search('[0-9]+',word):
|
||||
# Coerce standard-width strings for numbers
|
||||
|
|
|
|||
Loading…
Reference in a new issue