diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/HTML/Table.hs')
| -rw-r--r-- | src/Text/Pandoc/Readers/HTML/Table.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/HTML/Table.hs b/src/Text/Pandoc/Readers/HTML/Table.hs index 6179ea8e7..b8091d7e9 100644 --- a/src/Text/Pandoc/Readers/HTML/Table.hs +++ b/src/Text/Pandoc/Readers/HTML/Table.hs @@ -216,7 +216,7 @@ normalize widths head' bodies foot = do let rows = headRows head' <> concatMap bodyRows bodies <> footRows foot let cellWidth (Cell _ _ _ (ColSpan cs) _) = cs let rowLength = foldr (\cell acc -> cellWidth cell + acc) 0 . rowCells - let ncols = maximum (map rowLength rows) + let ncols = fromMaybe 0 $ viaNonEmpty maximum1 (map rowLength rows) let tblType = tableType (map rowCells rows) -- fail on empty table if null rows |
