summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorEdwin Török <edwin@etorok.net>2023-12-18 23:59:06 +0000
committerJohn MacFarlane <jgm@berkeley.edu>2023-12-18 17:15:03 -0800
commitfe8847bdaa8cc56fd95e037f3f9696a44f7ab043 (patch)
treecb364bf2fc38cd70d92a2268d9efbaff1a091a95 /src/Text
parent95dde29c5e19addaf8098c64a056e5056a4c4334 (diff)
fix(docx): use left vs start consistently
They are equivalent, but OOXML-Validator complains: ``` { "FilePath": "test/docx/golden/tables_separated_with_rawblock.docx", "ValidationErrors": "[{\"Description\":\"The attribute 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:val' has invalid value 'start'. The Enumeration constraint failed.\",\"Path\":{\"NamespacesDefinitions\":[\"xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\"],\"Namespaces\":{},\"XPath\":\"/w:document[1]/w:body[1]/w:tbl[2]/w:tblPr[1]/w:jc[1]\",\"PartUri\":\"/word/document.xml\"},\"Id\":\"Sch_AttributeValueDataTypeDetailed\",\"ErrorType\":\"Schema\"},{\"Description\":\"The attribute 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:val' has invalid value 'start'. The Enumeration constraint failed.\",\"Path\":{\"NamespacesDefinitions\":[\"xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\"],\"Namespaces\":{},\"XPath\":\"/w:document[1]/w:body[1]/w:tbl[1]/w:tblPr[1]/w:jc[1]\",\"PartUri\":\"/word/document.xml\"},\"Id\":\"Sch_AttributeValueDataTypeDetailed\",\"ErrorType\":\"Schema\"}]" } ``` pandoc already uses 'left' elsewhere, so be consistent, we still produce the transitional schema, not the strict one which would have the 'start' attribute. Signed-off-by: Edwin Török <edwin@etorok.net>
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Docx/Table.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Docx/Table.hs b/src/Text/Pandoc/Writers/Docx/Table.hs
index 4c6d81be6..5b9904fd3 100644
--- a/src/Text/Pandoc/Writers/Docx/Table.hs
+++ b/src/Text/Pandoc/Writers/Docx/Table.hs
@@ -115,7 +115,7 @@ tableToOpenXML opts blocksToOpenXML gridTable = do
( mknode "w:tblPr" []
( [ mknode "w:tblStyle" [("w:val","Table")] (),
mknode "w:tblW" tblWattr (),
- mknode "w:jc" [("w:val","start")] () ] ++
+ mknode "w:jc" [("w:val","left")] () ] ++
[ mknode "w:tblInd" [("w:w", tshow indent),("w:type","dxa")] ()
| indent > 0 ] ++
[ mknode "w:tblLayout" [("w:type", "fixed")] () | hasWidths ] ++