From 8b224a584a5a41c42e6ef666056bf4e263cd0164 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 4 Jan 2018 13:43:56 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/docx/writer/links.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/docx/writer/links.py b/src/calibre/ebooks/docx/writer/links.py index f2e1a27fb2..6293be50c5 100644 --- a/src/calibre/ebooks/docx/writer/links.py +++ b/src/calibre/ebooks/docx/writer/links.py @@ -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('_')