git.iko.soy/typeable/pandoc
on master help sign in
Markdown writer: use \ for newline instead of two spaces at eol.
78cea94John MacFarlane
src/Text/Pandoc/Writers/Markdown.hs+4−1
@@ -439,7 +439,10 @@ inlineToMarkdown _ (Math DisplayMath str) =
439 return $ "$$" <> text str <> "$$"
439 return $ "$$" <> text str <> "$$"
440inlineToMarkdown _ (TeX str) = return $ text str
440inlineToMarkdown _ (TeX str) = return $ text str
441inlineToMarkdown _ (HtmlInline str) = return $ text str
441inlineToMarkdown _ (HtmlInline str) = return $ text str
442−inlineToMarkdown _ (LineBreak) = return $ " " <> cr
442+inlineToMarkdown opts (LineBreak) = return $
443+ if writerStrictMarkdown opts
444+ then " " <> cr
445+ else "\\" <> cr
443inlineToMarkdown _ Space = return space
446inlineToMarkdown _ Space = return space
444inlineToMarkdown opts (Cite (c:cs) lst)
447inlineToMarkdown opts (Cite (c:cs) lst)
445 | writerCiteMethod opts == Citeproc = inlineListToMarkdown opts lst
448 | writerCiteMethod opts == Citeproc = inlineListToMarkdown opts lst
tests/writer.markdown+1−1
@@ -41,7 +41,7 @@ item.
41
41
42Here’s one with a bullet. \* criminey.
42Here’s one with a bullet. \* criminey.
43
43
44−There should be a hard line break
44+There should be a hard line break\
45here.
45here.
46
46
47* * * * *
47* * * * *