mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
...
This commit is contained in:
commit
d2abb0d3d4
@ -4422,14 +4422,12 @@ class CatalogBuilder(object):
|
||||
Generate a legal XHTML anchor from unicode character.
|
||||
|
||||
Args:
|
||||
c (unicode): character
|
||||
c (unicode): character(s)
|
||||
|
||||
Return:
|
||||
(str): legal XHTML anchor string of unicode character name
|
||||
"""
|
||||
fullname = ''
|
||||
for cc in c:
|
||||
fullname += unicodedata.name(unicode(cc))
|
||||
fullname = u''.join(unicodedata.name(unicode(cc)) for cc in c)
|
||||
terms = fullname.split()
|
||||
return "_".join(terms)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user