Lua utils: fix handling of table headers in from_simple_table

Passing an empty list of header cells now results in an empty table
header.

Fixes: #7369
This commit is contained in:
Albert Krewinkel
2021-06-10 18:36:49 +02:00
parent 76e5f047b0
commit 55bcd4b4fb
+1 -1
View File
@@ -146,7 +146,7 @@ from_simple_table (SimpleTable capt aligns widths head' body) = do
nullAttr
(Caption Nothing [Plain capt])
(zipWith (\a w -> (a, toColWidth w)) aligns widths)
(TableHead nullAttr [blockListToRow head'])
(TableHead nullAttr [blockListToRow head' | not (null head') ])
[TableBody nullAttr 0 [] $ map blockListToRow body]
(TableFoot nullAttr [])
return (NumResults 1)