aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs5
-rw-r--r--tests/writer.markdown2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index 50bf05a54..78666fdfe 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -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
diff --git a/tests/writer.markdown b/tests/writer.markdown
index 992bcd020..cc56b8b3a 100644
--- a/tests/writer.markdown
+++ b/tests/writer.markdown
@@ -41,7 +41,7 @@ item.
Here’s one with a bullet. \* criminey.
-There should be a hard line break
+There should be a hard line break\
here.
* * * * *