Markdown writer: use \ for newline instead of two spaces at eol.

(Unless --strict.)
This commit is contained in:
John MacFarlane 2010-12-20 19:35:29 -08:00
parent 8889ae8b5b
commit 78cea94f45
2 changed files with 5 additions and 2 deletions

View file

@ -439,7 +439,10 @@ inlineToMarkdown _ (Math DisplayMath str) =
return $ "$$" <> text str <> "$$"
inlineToMarkdown _ (TeX str) = return $ text str
inlineToMarkdown _ (HtmlInline str) = return $ text str
inlineToMarkdown _ (LineBreak) = return $ " " <> cr
inlineToMarkdown opts (LineBreak) = return $
if writerStrictMarkdown opts
then " " <> cr
else "\\" <> cr
inlineToMarkdown _ Space = return space
inlineToMarkdown opts (Cite (c:cs) lst)
| writerCiteMethod opts == Citeproc = inlineListToMarkdown opts lst

View file

@ -41,7 +41,7 @@ item.
Heres one with a bullet. \* criminey.
There should be a hard line break
There should be a hard line break\
here.
* * * * *