diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/HTML.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index d4360e521..0e7a33fe9 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -445,10 +445,10 @@ pTable = try $ do let isSimple = all isSinglePlain $ concat (head':rows'') let cols = length $ if null head' then head rows'' else head' -- add empty cells to short rows - let addEmpties r = case length r - cols of - n | n > 1 -> r ++ replicate n [] + let addEmpties r = case cols - length r of + n | n > 0 -> r ++ replicate n mempty | otherwise -> r - let rows = addEmpties rows'' + let rows = map addEmpties rows'' let aligns = replicate cols AlignDefault let widths = if null widths' then if isSimple |