mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
DOCX Input: Fix non-breaking hyphens being ignored
This commit is contained in:
parent
fbddd0427d
commit
38d9af3fe0
@ -615,6 +615,10 @@ class Convert(object):
|
|||||||
text.add_elem(SPAN(NBSP * spaces))
|
text.add_elem(SPAN(NBSP * spaces))
|
||||||
ans.append(text.elem)
|
ans.append(text.elem)
|
||||||
ans[-1].set('class', 'tab')
|
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:
|
if text.buf:
|
||||||
setattr(text.elem, text.attr, ''.join(text.buf))
|
setattr(text.elem, text.attr, ''.join(text.buf))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user