In HTML reader, filter Nulls in lists of blocks. (These can
be caused by raw HTML when the parse-raw option isn't selected.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@787 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
9f871ab1ec
commit
d8762eb436
1 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ inlineHtmlTags = ["a", "abbr", "acronym", "b", "basefont", "bdo", "big",
|
|||
-- | Read blocks until end tag.
|
||||
blocksTilEnd tag = try (do
|
||||
blocks <- manyTill (do {b <- block; spaces; return b}) (htmlEndTag tag)
|
||||
return blocks)
|
||||
return $ filter (/= Null) blocks)
|
||||
|
||||
-- | Read inlines until end tag.
|
||||
inlinesTilEnd tag = try (do
|
||||
|
@ -288,7 +288,7 @@ parseHtml = do
|
|||
parseBlocks = do
|
||||
spaces
|
||||
result <- sepEndBy block spaces
|
||||
return result
|
||||
return $ filter (/= Null) result
|
||||
|
||||
block = choice [ codeBlock, header, hrule, list, blockQuote, para, plain,
|
||||
rawHtmlBlock ] <?> "block"
|
||||
|
|
Loading…
Add table
Reference in a new issue