aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-12-08 15:50:39 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-12-08 15:50:39 -0800
commitdd9cb2c872188a2eabe20b4afdf2865969bcff70 (patch)
tree37260aaadc016094c8c95cf2e691d67c48d556cc /src
parent4458fed97270d72c16683b5a11bf70836102a736 (diff)
parentf7b265e2ff79c36c88f5eb6a0bbb8005e2654ecc (diff)
downloadpandoc-dd9cb2c872188a2eabe20b4afdf2865969bcff70.tar.gz
Merge pull request #1794 from mpickering/docxfix
Fix for #1641 (docx table captions above tables)
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index f8e8cc34d..5b9cc62ab 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -715,7 +715,8 @@ blockToOpenXML opts (Table caption aligns widths headers rows) = do
let mkgridcol w = mknode "w:gridCol"
[("w:w", show (floor (textwidth * w) :: Integer))] ()
return $
- mknode "w:tbl" []
+ caption' ++
+ [mknode "w:tbl" []
( mknode "w:tblPr" []
( mknode "w:tblStyle" [("w:val","TableNormal")] () :
mknode "w:tblW" [("w:type", "pct"), ("w:w", show rowwidth)] () :
@@ -727,7 +728,7 @@ blockToOpenXML opts (Table caption aligns widths headers rows) = do
else map mkgridcol widths)
: [ mkrow True headers' | not (all null headers) ] ++
map (mkrow False) rows'
- ) : caption'
+ )]
blockToOpenXML opts (BulletList lst) = do
let marker = BulletMarker
addList marker