aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-01-02 10:31:13 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2019-01-02 10:31:13 -0800
commitea8af33dab2ba5abba12c61ada7e62f9752cb973 (patch)
tree836cc2ca5ad891689d39c999225e5d978e1344ce /src/Text
parent1bbbd5fad349624148779dbc08a9b00332afc1f4 (diff)
downloadpandoc-ea8af33dab2ba5abba12c61ada7e62f9752cb973.tar.gz
Commonmark writer: fix handling of SoftBreak with `hard_line_breaks`.
This should be rendered as a space. Closes #5195.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/CommonMark.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/CommonMark.hs b/src/Text/Pandoc/Writers/CommonMark.hs
index c007f7734..6299b0263 100644
--- a/src/Text/Pandoc/Writers/CommonMark.hs
+++ b/src/Text/Pandoc/Writers/CommonMark.hs
@@ -247,7 +247,7 @@ inlineToNodes opts (Str s) = stringToNodes opts s'
inlineToNodes _ Space = (node (TEXT (T.pack " ")) [] :)
inlineToNodes _ LineBreak = (node LINEBREAK [] :)
inlineToNodes opts SoftBreak
- | isEnabled Ext_hard_line_breaks opts = (node LINEBREAK [] :)
+ | isEnabled Ext_hard_line_breaks opts = (node (TEXT " ") [] :)
| writerWrapText opts == WrapNone = (node (TEXT " ") [] :)
| otherwise = (node SOFTBREAK [] :)
inlineToNodes opts (Emph xs) = (node EMPH (inlinesToNodes opts xs) :)