mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Input: Fix regression in 2.19 that broke handling of text with leading or trailing non-breaking spaces/en-spaces/quad-spaces. Fixes #1422844 [disappearing spaces](https://bugs.launchpad.net/calibre/+bug/1422844)
This commit is contained in:
parent
bd5ba883a1
commit
2cc26bb124
@ -585,7 +585,7 @@ class Convert(object):
|
|||||||
if space != 'preserve':
|
if space != 'preserve':
|
||||||
# Remove leading and trailing whitespace. Word ignores
|
# Remove leading and trailing whitespace. Word ignores
|
||||||
# leading and trailing whitespace without preserve
|
# leading and trailing whitespace without preserve
|
||||||
ctext = ctext.strip()
|
ctext = ctext.strip(' \n\r\t')
|
||||||
# Only use a <span> with white-space:pre-wrap if this element
|
# Only use a <span> with white-space:pre-wrap if this element
|
||||||
# actually needs it, i.e. if it has more than one
|
# actually needs it, i.e. if it has more than one
|
||||||
# consecutive space or it has newlines or tabs.
|
# consecutive space or it has newlines or tabs.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user