From b98219773b45ed43268204e59c494f45b4455d2c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 27 Jul 2012 09:18:51 -0700 Subject: Replaced writerStrict with writerExtensions in WriterOptions. Still have not implemented individual tests for all the extensions in the markdown writer. --- src/Text/Pandoc/Readers/Markdown.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index ae51fdd5a..8b34b9b4a 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1005,10 +1005,11 @@ escapedChar' = try $ do escapedChar :: Parser [Char] ParserState Inline escapedChar = do result <- escapedChar' - return $ case result of - ' ' -> Str "\160" -- "\ " is a nonbreaking space - '\n' -> LineBreak -- "\[newline]" is a linebreak - _ -> Str [result] + case result of + ' ' -> return $ Str "\160" -- "\ " is a nonbreaking space + '\n' -> guardEnabled Ext_escaped_line_breaks >> + return LineBreak -- "\[newline]" is a linebreak + _ -> return $ Str [result] ltSign :: Parser [Char] ParserState Inline ltSign = do @@ -1042,7 +1043,8 @@ code = try $ do (char '\n' >> notFollowedBy' blankline >> return " ")) (try (skipSpaces >> count (length starts) (char '`') >> notFollowedBy (char '`'))) - attr <- option ([],[],[]) (try $ optional whitespace >> attributes) + attr <- option ([],[],[]) (try $ guardEnabled Ext_inline_code_attributes >> + optional whitespace >> attributes) return $ Code attr $ removeLeadingTrailingSpace $ concat result mathWord :: Parser [Char] st [Char] -- cgit v1.2.3