summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-07-27 09:18:51 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-07-27 09:18:51 -0700
commitb98219773b45ed43268204e59c494f45b4455d2c (patch)
tree8b03fdf2ba378064439f3132fb8c7d541930d8b4 /src/Text/Pandoc/Readers
parent00dc1e715e6317ab499c864137bb2a6bf7a75364 (diff)
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.hs12
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]