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