HTML reader: Allow multiple colgroups in table.

Closes #2122.
This commit is contained in:
John MacFarlane 2015-04-29 12:05:38 -07:00
parent bc95b615b1
commit 55b7afc674

View file

@ -380,7 +380,7 @@ pTable = try $ do
skipMany pBlank
caption <- option mempty $ pInTags "caption" inline <* skipMany pBlank
-- TODO actually read these and take width information from them
widths' <- pColgroup <|> many pCol
widths' <- (mconcat <$> many1 pColgroup) <|> many pCol
let pTh = option [] $ pInTags "tr" (pCell "th")
pTr = try $ skipMany pBlank >> pInTags "tr" (pCell "td" <|> pCell "th")
pTBody = do pOptInTag "tbody" $ many1 pTr