mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-21 05:43:39 +08:00
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>
This commit is contained in:
committed by
John MacFarlane
parent
c5780857e5
commit
95dde29c5e
@@ -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")] ()) $
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user