From 7ad17fe5cff04e0b68be5c4a08339bb53d3d176d Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Tue, 16 Sep 2008 01:39:05 +0000 Subject: Markdown reader: Ignore blank line after ~~~~~~~~ in delimited code blocks. Rationale: these are useful for literate haskell, but lhs requires a blank line before the haskell code, and we don't want spurious blank lines in the output. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1454 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Readers/Markdown.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Text/Pandoc/Readers') diff --git a/Text/Pandoc/Readers/Markdown.hs b/Text/Pandoc/Readers/Markdown.hs index 29e47e37b..0326bac95 100644 --- a/Text/Pandoc/Readers/Markdown.hs +++ b/Text/Pandoc/Readers/Markdown.hs @@ -379,6 +379,8 @@ keyValAttr = try $ do codeBlockDelimited :: GenParser Char st Block codeBlockDelimited = try $ do (size, attr) <- codeBlockDelimiter Nothing + optional blankline -- this helps make literate haskell possible; it requires + -- a blank line between comment and code contents <- manyTill anyLine (codeBlockDelimiter (Just size)) blanklines return $ CodeBlock attr $ intercalate "\n" contents -- cgit v1.2.3