diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 792c0269a..551abd357 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -306,7 +306,7 @@ parseBlocks :: Parser [Char] ParserState (F Blocks) parseBlocks = mconcat <$> manyTill block eof block :: Parser [Char] ParserState (F Blocks) -block = choice [ codeBlockDelimited +block = choice [ codeBlockFenced , guardEnabled Ext_latex_macros *> (mempty <$ macro) , header , rawTeXBlock @@ -435,9 +435,9 @@ keyValAttr = try $ do <|> many nonspaceChar return ("",[],[(key,val)]) -codeBlockDelimited :: Parser [Char] ParserState (F Blocks) -codeBlockDelimited = try $ do - guardEnabled Ext_delimited_code_blocks +codeBlockFenced :: Parser [Char] ParserState (F Blocks) +codeBlockFenced = try $ do + guardEnabled Ext_fenced_code_blocks (size, attr, c) <- blockDelimiter (\c -> c == '~' || c == '`') Nothing contents <- manyTill anyLine (blockDelimiter (== c) (Just size)) blanklines |