@@ -445,10 +445,10 @@ pTable = try $ do
445 let isSimple = all isSinglePlain $ concat (head':rows'')
445 let isSimple = all isSinglePlain $ concat (head':rows'')
446 let cols = length $ if null head' then head rows'' else head'
446 let cols = length $ if null head' then head rows'' else head'
447 -- add empty cells to short rows
447 -- add empty cells to short rows
448− let addEmpties r = case length r - cols of
448+ let addEmpties r = case cols - length r of
449− n | n > 1 -> r ++ replicate n []
449+ n | n > 0 -> r ++ replicate n mempty
450 | otherwise -> r
450 | otherwise -> r
451− let rows = addEmpties rows''
451+ let rows = map addEmpties rows''
452 let aligns = replicate cols AlignDefault
452 let aligns = replicate cols AlignDefault
453 let widths = if null widths'
453 let widths = if null widths'
454 then if isSimple
454 then if isSimple