diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-02-09 03:20:02 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-02-09 03:20:02 +0000 |
commit | 06b544360e8ba61081070409d39e4f9ca5bcebcd (patch) | |
tree | 04fe0ec41d4be654dfb98ed5d88c7d94484e65d8 /Text/Pandoc/Readers | |
parent | db0d658e9cc75be61756b6e53df292ec046d7087 (diff) | |
download | pandoc-06b544360e8ba61081070409d39e4f9ca5bcebcd.tar.gz |
Factored codeBlock into separate codeBlockIndented and codeBlockDelimited.
Do not use codeBlockDelimited in strict mode.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1211 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc/Readers')
-rw-r--r-- | Text/Pandoc/Readers/Markdown.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Text/Pandoc/Readers/Markdown.hs b/Text/Pandoc/Readers/Markdown.hs index 7ac78f2af..e6f09f97a 100644 --- a/Text/Pandoc/Readers/Markdown.hs +++ b/Text/Pandoc/Readers/Markdown.hs @@ -230,7 +230,7 @@ block = do st <- getState choice (if stateStrict st then [ header - , codeBlock + , codeBlockIndented , blockQuote , hrule , bulletList @@ -239,9 +239,10 @@ block = do , para , plain , nullBlock ] - else [ header + else [ codeBlockDelimited + , header , table - , codeBlock + , codeBlockIndented , blockQuote , hrule , bulletList @@ -295,8 +296,6 @@ hrule = try $ do indentedLine = indentSpaces >> manyTill anyChar newline >>= return . (++ "\n") -codeBlock = codeBlockIndented <|> codeBlockDelimited - codeBlockDelimiter len = try $ do size <- case len of Just l -> count l (char '~') >> many (char '~') >> return l |