From dc6a133dbfdfcae670ee64e86700fd8234540643 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 21 Aug 2012 19:35:36 -0700 Subject: Added Ext_fenced_code_attributes. --- src/Text/Pandoc/Readers/Markdown.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 551abd357..df3e7687b 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -379,7 +379,7 @@ indentedLine = indentSpaces >> manyTill anyChar newline >>= return . (++ "\n") blockDelimiter :: (Char -> Bool) -> Maybe Int - -> Parser [Char] st (Int, (String, [String], [(String, String)]), Char) + -> Parser [Char] ParserState (Int, (String, [String], [(String, String)]), Char) blockDelimiter f len = try $ do c <- lookAhead (satisfy f) size <- case len of @@ -387,9 +387,11 @@ blockDelimiter f len = try $ do Nothing -> count 3 (char c) >> many (char c) >>= return . (+ 3) . length many spaceChar - attr <- option ([],[],[]) - $ attributes -- ~~~ {.ruby} - <|> (many1 alphaNum >>= \x -> return ([],[x],[])) -- github variant ```ruby + attr <- option ([],[],[]) $ do + guardEnabled Ext_fenced_code_attributes + attributes -- ~~~ {.ruby} + <|> (many1 alphaNum >>= \x -> + return ([],[x],[])) -- github variant ```ruby blankline return (size, attr, c) -- cgit v1.2.3