@@ -54,6 +54,9 @@ readCommonMark opts s = return $
5454 (if enabled Ext_emoji
5555 then addEmojis
5656 else id) $
57+ (if enabled Ext_hard_line_breaks
58+ then walk softToHardBreaks
59+ else id) $
5760 nodeToPandoc $ commonmarkToNode opts' exts s
5861 where opts' = [ optSmart | enabled Ext_smart ]
5962 exts = [ extStrikethrough | enabled Ext_strikeout ] ++
@@ -61,6 +64,10 @@ readCommonMark opts s = return $
6164 [ extAutolink | enabled Ext_autolink_bare_uris ]
6265 enabled x = extensionEnabled x (readerExtensions opts)
6366
67+softToHardBreaks :: Inline -> Inline
68+softToHardBreaks SoftBreak = LineBreak
69+softToHardBreaks x = x
70+
6471addEmojis :: Pandoc -> Pandoc
6572addEmojis = walk go
6673 where go (Str xs) = Str (convertEmojis xs)