aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorSebastian Talmon <35015406+stalmon@users.noreply.github.com>2018-01-02 09:43:04 +0100
committerGitHub <noreply@github.com>2018-01-02 09:43:04 +0100
commit053a1dcd102c5198267734ce140fff3aa9c08bac (patch)
treedd2f8d71a36220e6e45d6ecf92b562242d1c18fe /src/Text/Pandoc
parent4f43a1d250287e8d89ee5cd3c8b020ea6fe83758 (diff)
downloadpandoc-053a1dcd102c5198267734ce140fff3aa9c08bac.tar.gz
firstRow table definition compatibility for Word 2016
Word 2016 seems to use a default value of "1" for table headers, if there is no firstRow definition (although a default value of 0 is documented), so all tables get the first Row formatted as header. Setting the parameter to 0 if the table has no header row fixes this for Word 2016
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index 88caccdf7..ac8bef003 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -981,7 +981,7 @@ blockToOpenXML' opts (Table caption aligns widths headers rows) = do
( mknode "w:tblPr" []
( mknode "w:tblStyle" [("w:val","Table")] () :
mknode "w:tblW" [("w:type", "pct"), ("w:w", show rowwidth)] () :
- mknode "w:tblLook" [("w:firstRow","1") | hasHeader ] () :
+ mknode "w:tblLook" [("w:firstRow",if hasHeader then "1" else "0") ] () :
[ mknode "w:tblCaption" [("w:val", captionStr)] ()
| not (null caption) ] )
: mknode "w:tblGrid" []