diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-12-05 05:33:24 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-12-05 05:33:24 +0000 |
commit | 8671bc5a1be38f6555e34d7ccc542ebbe91f69fd (patch) | |
tree | b1dcbf74eb45462d3f6cb0493792fe2a94daf680 /src/Text | |
parent | 94841b7602f3465cdb7a452989975d08e43fc694 (diff) | |
download | pandoc-8671bc5a1be38f6555e34d7ccc542ebbe91f69fd.tar.gz |
Markdown reader: Treat a backslash followed by a newline as hard linebreak.
Resolves Issue #154.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1646 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text')
-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 4f0d1b6ad..c6926e3c1 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -863,10 +863,10 @@ escapedChar = do result <- option '\\' $ if stateStrict state then oneOf "\\`*_{}[]()>#+-.!~" else satisfy (not . isAlphaNum) - let result' = if result == ' ' - then '\160' -- '\ ' is a nonbreaking space - else result - return $ Str [result'] + return $ case result of + ' ' -> Str "\160" -- "\ " is a nonbreaking space + '\n' -> LineBreak -- "\[newline]" is a linebreak + _ -> Str [result] ltSign :: GenParser Char ParserState Inline ltSign = do |