mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:43:40 +02:00
DOCX Output: Workaround for broken CSS that uses -o-pre-wrap for the white-space property
See #1786410 (book lost its content format when converting)
This commit is contained in:
parent
30b1f442a6
commit
2447be653b
1 changed files with 1 additions and 1 deletions
|
|
@ -169,7 +169,7 @@ def resolve_skipped(self, next_block):
|
|||
|
||||
def add_text(self, text, style, ignore_leading_whitespace=False, html_parent=None, is_parent_style=False, bookmark=None, link=None, lang=None):
|
||||
ws = style['white-space']
|
||||
preserve_whitespace = ws in {'pre', 'pre-wrap'}
|
||||
preserve_whitespace = ws in {'pre', 'pre-wrap', '-o-pre-wrap'}
|
||||
ts = self.styles_manager.create_text_style(style, is_parent_style=is_parent_style)
|
||||
if self.runs and ts == self.runs[-1].style and link == self.runs[-1].link and lang == self.runs[-1].lang:
|
||||
run = self.runs[-1]
|
||||
|
|
|
|||
Loading…
Reference in a new issue