From 38d9af3fe0750b7dba77a63d265d06515aaf2a6c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 2 Sep 2014 10:37:53 +0530 Subject: [PATCH] DOCX Input: Fix non-breaking hyphens being ignored --- src/calibre/ebooks/docx/to_html.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/ebooks/docx/to_html.py b/src/calibre/ebooks/docx/to_html.py index 69afb73d71..b18496fcc9 100644 --- a/src/calibre/ebooks/docx/to_html.py +++ b/src/calibre/ebooks/docx/to_html.py @@ -615,6 +615,10 @@ class Convert(object): text.add_elem(SPAN(NBSP * spaces)) ans.append(text.elem) ans[-1].set('class', 'tab') + elif is_tag(child, 'w:noBreakHyphen'): + text.buf.append(u'\u2011') + elif is_tag(child, 'w:softHyphen'): + text.buf.append(u'\u00ad') if text.buf: setattr(text.elem, text.attr, ''.join(text.buf))