diff options
Diffstat (limited to 'Text')
-rw-r--r-- | Text/Pandoc/Readers/Markdown.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Text/Pandoc/Readers/Markdown.hs b/Text/Pandoc/Readers/Markdown.hs index 73b7e688a..c4d8778aa 100644 --- a/Text/Pandoc/Readers/Markdown.hs +++ b/Text/Pandoc/Readers/Markdown.hs @@ -299,7 +299,7 @@ codeBlock = codeBlockIndented <|> codeBlockDelimited codeBlockDelimiter len = try $ do size <- case len of - Just l -> count l (char '~') >> return l + Just l -> count l (char '~') >> many (char '~') >> return l Nothing -> count 3 (char '~') >> many (char '~') >>= return . (+ 3) . length many spaceChar @@ -320,6 +320,7 @@ classAttributes = try $ do codeBlockDelimited = try $ do (size, lang) <- codeBlockDelimiter Nothing contents <- manyTill anyLine (codeBlockDelimiter (Just size)) + blanklines return $ CodeBlock lang $ joinWithSep "\n" contents codeBlockIndented = do |