diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-11-26 13:36:18 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-11-26 13:36:18 +0100 |
commit | 9524e3760230567daa574b2749f59ac5c5a16cef (patch) | |
tree | 56df1a56da53698b5bf108b513e508761471bf96 /helpcontent2/to-wiki | |
parent | 634e1e7ebd1658cc3aa9954eb5057ecdf12fefd1 (diff) |
wikihelp: Improve the whitespace behavior in paragraphs.
Diffstat (limited to 'helpcontent2/to-wiki')
-rwxr-xr-x | helpcontent2/to-wiki/wikiconv2.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/helpcontent2/to-wiki/wikiconv2.py b/helpcontent2/to-wiki/wikiconv2.py index 1c7f253cbd..9d0e86fc6b 100755 --- a/helpcontent2/to-wiki/wikiconv2.py +++ b/helpcontent2/to-wiki/wikiconv2.py @@ -926,6 +926,11 @@ class Paragraph(ElementBase): pass def char_data(self, parser, data): + if self.role == 'paragraph' or self.role == 'heading': + if data != '' and data[0] == ' ': + data = ' ' + data.lstrip() + data = data.replace('\n', ' ') + if len(self.localized_objects): return loc_text = u'' |