parent
0db7d87240
commit
a9f037a615
1 changed files with 3 additions and 1 deletions
|
@ -228,6 +228,8 @@ pSimpleTable :: TagParser [Block]
|
|||
pSimpleTable = try $ do
|
||||
TagOpen _ _ <- pSatisfy (~== TagOpen "table" [])
|
||||
skipMany pBlank
|
||||
caption <- option [] $ pInTags "caption" inline >>~ skipMany pBlank
|
||||
skipMany $ pInTags "col" block >> skipMany pBlank
|
||||
head' <- option [] $ pOptInTag "thead" $ pInTags "tr" (pCell "th")
|
||||
skipMany pBlank
|
||||
rows <- pOptInTag "tbody"
|
||||
|
@ -237,7 +239,7 @@ pSimpleTable = try $ do
|
|||
let cols = maximum $ map length rows
|
||||
let aligns = replicate cols AlignLeft
|
||||
let widths = replicate cols 0
|
||||
return [Table [] aligns widths head' rows]
|
||||
return [Table caption aligns widths head' rows]
|
||||
|
||||
pCell :: String -> TagParser [TableCell]
|
||||
pCell celltype = try $ do
|
||||
|
|
Loading…
Add table
Reference in a new issue