diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2021-06-10 18:26:53 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2021-06-10 18:36:49 +0200 |
commit | 55bcd4b4fb1dced6c6e316db6cd117b52bbadee5 (patch) | |
tree | 986b74601af857a2cdf8905a57dec7882270d83e /src | |
parent | 76e5f047b0ef4c293687f9ddce62d601b23058a9 (diff) | |
download | pandoc-55bcd4b4fb1dced6c6e316db6cd117b52bbadee5.tar.gz |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Lua/Module/Utils.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Lua/Module/Utils.hs b/src/Text/Pandoc/Lua/Module/Utils.hs index 1b04021a7..3ec3afc26 100644 --- a/src/Text/Pandoc/Lua/Module/Utils.hs +++ b/src/Text/Pandoc/Lua/Module/Utils.hs @@ -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) |