From 575a6ea12115ae75de60cfdb0367bc6b89603d3d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Nov 2019 12:52:23 +0530 Subject: [PATCH] DOCX Input: Fix AlternateContent blocks rendering both choice and fallback sections. Fixes #1847365 [Private bug](https://bugs.launchpad.net/calibre/+bug/1847365) --- src/calibre/ebooks/docx/to_html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/docx/to_html.py b/src/calibre/ebooks/docx/to_html.py index c56c78f8c9..cc1175bbce 100644 --- a/src/calibre/ebooks/docx/to_html.py +++ b/src/calibre/ebooks/docx/to_html.py @@ -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