diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-02-09 03:19:17 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-02-09 03:19:17 +0000 |
commit | 2e683e8b534f3e10ffff6c0dd3cd7cab3ebd40a5 (patch) | |
tree | d444df498021f2df033068b28ba5343c6bef7e9a /Text/Pandoc | |
parent | 24f22ee7ac93c4523f54d3ac791a35f68af38362 (diff) | |
download | pandoc-2e683e8b534f3e10ffff6c0dd3cd7cab3ebd40a5.tar.gz |
Fixed delimited code blocks: eat blank lines afterwards, and allow end line
to contain more tildes than beginning line.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1206 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc')
-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 |