DOCX Input: Fix AlternateContent blocks rendering both choice and fallback sections. Fixes #1847365 [Private bug](https://bugs.launchpad.net/calibre/+bug/1847365)

This commit is contained in:
Kovid Goyal 2019-11-03 12:52:23 +05:30
parent 07b48787c9
commit 575a6ea121
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -104,6 +104,7 @@ class Convert(object):
def __call__(self):
doc = self.docx.document
relationships_by_id, relationships_by_type = self.docx.document_relationships
self.resolve_alternate_content(doc)
self.fields(doc, self.log)
self.read_styles(relationships_by_type)
self.images(relationships_by_id)
@ -121,7 +122,6 @@ class Convert(object):
self.log.debug('Converting Word markup to HTML')
self.read_page_properties(doc)
self.resolve_alternate_content(doc)
self.current_rels = relationships_by_id
for wp, page_properties in iteritems(self.page_map):
self.current_page = page_properties