From c7dd33d5aaa30f4c95e141b10e6d8fe0212edf1e Mon Sep 17 00:00:00 2001
From: Albert Krewinkel <albert@zeitkraut.de>
Date: Thu, 10 Jun 2021 18:34:20 +0200
Subject: 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
---
 src/Text/Pandoc/Writers/Docx/Table.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/Text')

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
-- 
cgit v1.2.3