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:
Kovid Goyal 2015-02-19 10:40:58 +05:30
parent bd5ba883a1
commit 2cc26bb124

View File

@ -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.