diff options
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Readers/HTML/Table.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/HTML/Table.hs b/src/Text/Pandoc/Readers/HTML/Table.hs index abe617ecc..99a090f16 100644 --- a/src/Text/Pandoc/Readers/HTML/Table.hs +++ b/src/Text/Pandoc/Readers/HTML/Table.hs @@ -133,7 +133,9 @@ pRow block = try $ do TagOpen _ attribs <- pSatisfy (matchTagOpen "tr" []) <* skipMany pBlank cells <- many (pCell block BodyCell <|> pCell block HeaderCell) TagClose _ <- pSatisfy (matchTagClose "tr") - return ( RowHeadColumns $ length (takeWhile ((== HeaderCell) . fst) cells) + return ( RowHeadColumns $ foldr (\(_, Cell _ _ _ (ColSpan colspan) _) -> + (+ colspan)) 0 + (takeWhile ((== HeaderCell) . fst) cells) , Row (toAttr attribs) $ map snd cells ) |
