This commit is contained in:
Kovid Goyal 2018-01-04 13:43:56 +05:30
parent 19638bffd1
commit 8b224a584a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -60,7 +60,7 @@ class TOCItem(object):
def sanitize_bookmark_name(base):
# Max length allowed by Word appears to be 40, we use 32 to leave some
# space for making the name non-unique
# space for making the name unique
return re.sub(r'[^0-9a-zA-Z]', '_', ascii_text(base))[:32].rstrip('_')