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
This commit is contained in:
parent
db0d658e9c
commit
06b544360e
1 changed files with 4 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue