mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Also handle soft hyphens with trailing spaces
This commit is contained in:
parent
b0d3fe6677
commit
c38bacc0ba
@ -124,6 +124,9 @@ class TextRun:
|
||||
add_text(' ', True)
|
||||
makeelement(r, 'w:softHyphen')
|
||||
elif x:
|
||||
if not preserve_whitespace and x.startswith(' ') and len(r) and r[-1].tag and 'softHyphen' in r[-1].tag:
|
||||
x = x.lstrip()
|
||||
add_text(' ', True)
|
||||
add_text(x, preserve_whitespace)
|
||||
else:
|
||||
add_text('', preserve_whitespace)
|
||||
|
Loading…
x
Reference in New Issue
Block a user