From f2ccff541ce866184b380260b52ede627290d6c9 Mon Sep 17 00:00:00 2001 From: Alex Hill Date: Wed, 7 Feb 2018 11:20:18 +0800 Subject: [PATCH] Don't strip properties from whitespace-only runs The width of a space can be important, and stripping properties throws away this information. --- pyth/plugins/rtf15/reader.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pyth/plugins/rtf15/reader.py b/pyth/plugins/rtf15/reader.py index 7a74162..1845ad9 100644 --- a/pyth/plugins/rtf15/reader.py +++ b/pyth/plugins/rtf15/reader.py @@ -263,11 +263,6 @@ def cleanParagraph(self): else: continue - # For whitespace-only groups, remove any property stuff, - # to avoid extra markup in output - if not run.content[0].strip(): - run.properties = {} - # Join runs only if their properties match if joinedRuns and (run.properties == joinedRuns[-1].properties): joinedRuns[-1].content[0] += run.content[0]