This commit is contained in:
Kovid Goyal 2013-01-06 09:50:00 +05:30
commit d2abb0d3d4

View File

@ -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)