git.iko.soy/typeable/pandoc
on master help sign in
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

commitd8762eb43662ca8d099d831d454abe402a8fc10a authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateMon 23 Jul 2007, 02:50 (19 years ago) parent9f871ab
1 file changed+2−2
src/Text/Pandoc/Readers/HTML.hs+2−2
src/Text/Pandoc/Readers/HTML.hs+2−2
@@ -76,7 +76,7 @@ inlineHtmlTags = ["a", "abbr", "acronym", "b", "basefont", "bdo", "big",
7676-- | Read blocks until end tag.
7777blocksTilEnd tag = try (do
7878 blocks <- manyTill (do {b <- block; spaces; return b}) (htmlEndTag tag)
79− return blocks)
79+ return $ filter (/= Null) blocks)
8080
8181-- | Read inlines until end tag.
8282inlinesTilEnd tag = try (do
@@ -288,7 +288,7 @@ parseHtml = do
288288parseBlocks = do
289289 spaces
290290 result <- sepEndBy block spaces
291− return result
291+ return $ filter (/= Null) result
292292
293293block = choice [ codeBlock, header, hrule, list, blockQuote, para, plain,
294294 rawHtmlBlock ] <?> "block"