diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2021-06-10 18:34:20 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2021-06-10 18:36:49 +0200 |
commit | c7dd33d5aaa30f4c95e141b10e6d8fe0212edf1e (patch) | |
tree | 5b9cbd41dc9f0f99b859c07c6f310d38361a98c4 /src/Text/Pandoc/Writers | |
parent | 55bcd4b4fb1dced6c6e316db6cd117b52bbadee5 (diff) | |
download | pandoc-c7dd33d5aaa30f4c95e141b10e6d8fe0212edf1e.tar.gz |
Docx writer: fix handling of empty table headers
A table header which does not contain any cells is now treated as an
empty header.
Fixes: #7369
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Docx/Table.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Docx/Table.hs b/src/Text/Pandoc/Writers/Docx/Table.hs index 13cb31040..49917e315 100644 --- a/src/Text/Pandoc/Writers/Docx/Table.hs +++ b/src/Text/Pandoc/Writers/Docx/Table.hs @@ -116,8 +116,8 @@ cellGridToOpenXML :: PandocMonad m -> [Alignment] -> Part -> WS m [Element] -cellGridToOpenXML blocksToOpenXML rowType aligns part@(Part _ _ rowAttrs) = - if null (indices rowAttrs) +cellGridToOpenXML blocksToOpenXML rowType aligns part@(Part _ cellArray _) = + if null (elems cellArray) then return mempty else mapM (rowToOpenXML blocksToOpenXML) $ partToRows rowType aligns part |