mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Handle passing None to unicode_normalize
This commit is contained in:
parent
0c03155074
commit
ae81ae2b72
@ -12,8 +12,10 @@ no_cfi_sort_key = cfi_sort_key('/99999999')
|
|||||||
|
|
||||||
|
|
||||||
def unicode_normalize(text):
|
def unicode_normalize(text):
|
||||||
|
if text:
|
||||||
from unicodedata import normalize
|
from unicodedata import normalize
|
||||||
return normalize('NFKC', text)
|
text = normalize('NFKC', text)
|
||||||
|
return text
|
||||||
|
|
||||||
|
|
||||||
def bookmark_sort_key(b):
|
def bookmark_sort_key(b):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user