mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fixed MOBI indexing for mixed case
This commit is contained in:
parent
28d5317c8f
commit
1c7d7ae2d5
@ -2512,6 +2512,7 @@ class EPUB_MOBI(CatalogPlugin):
|
||||
|
||||
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 @@ class EPUB_MOBI(CatalogPlugin):
|
||||
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…
x
Reference in New Issue
Block a user