summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorEdwin Török <edwin@etorok.net>2023-12-18 23:43:57 +0000
committerJohn MacFarlane <jgm@berkeley.edu>2023-12-18 17:15:03 -0800
commit95dde29c5e19addaf8098c64a056e5056a4c4334 (patch)
treef1fd85b1fe5c3572915b5843f968ffdb642b479e /src/Text
parentc5780857e5ebe54246d3066e7aa95424309bd05c (diff)
fix(docx): fix validation error on inline w:i/w:iCs order
From `make validate-docx-golden-tests2`: ``` { "FilePath": "test/docx/golden/definition_list.docx", "ValidationErrors": "[{\"Description\":\"The element has unexpected child element 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:i'.\",\"Path\":{\"NamespacesDefinitions\":[\"xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\"],\"Namespaces\":{},\"XPath\":\"/w:document[1]/w:body[1]/w:p[3]/w:r[3]/w:rPr[1]\",\"PartUri\":\"/word/document.xml\"},\"Id\":\"Sch_UnexpectedElementContentExpectingComplex\",\"ErrorType\":\"Schema\"}]" }, ``` Signed-off-by: Edwin Török <edwin@etorok.net>
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index 7db854187..3acd695c5 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -1364,12 +1364,12 @@ inlineToOpenXML' opts (Span (ident,classes,kvs) ils) = do
langmod $ inlinesToOpenXML opts ils
wrapBookmark ident contents
inlineToOpenXML' opts (Strong lst) =
- withTextProp (mknode "w:b" [] ()) $
withTextProp (mknode "w:bCs" [] ()) $ -- needed for LTR, #6911
+ withTextProp (mknode "w:b" [] ()) $
inlinesToOpenXML opts lst
inlineToOpenXML' opts (Emph lst) =
- withTextProp (mknode "w:i" [] ()) $
withTextProp (mknode "w:iCs" [] ()) $ -- needed for LTR, #6911
+ withTextProp (mknode "w:i" [] ()) $
inlinesToOpenXML opts lst
inlineToOpenXML' opts (Underline lst) =
withTextProp (mknode "w:u" [("w:val","single")] ()) $