diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-07-27 09:18:51 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-07-27 09:18:51 -0700 |
commit | b98219773b45ed43268204e59c494f45b4455d2c (patch) | |
tree | 8b03fdf2ba378064439f3132fb8c7d541930d8b4 /src/Text/Pandoc/Readers | |
parent | 00dc1e715e6317ab499c864137bb2a6bf7a75364 (diff) | |
download | pandoc-b98219773b45ed43268204e59c494f45b4455d2c.tar.gz |
Replaced writerStrict with writerExtensions in WriterOptions.
Still have not implemented individual tests for all the extensions
in the markdown writer.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 12 |
1 files changed, 7 insertions, 5 deletions
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] |