mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 05:08:55 +02:00
DOCX Input: Fix non-breaking hyphens being ignored
This commit is contained in:
parent
fbddd0427d
commit
38d9af3fe0
1 changed files with 4 additions and 0 deletions
|
|
@ -615,6 +615,10 @@ def convert_run(self, run):
|
|||
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))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue