From 30bf917e1c4234528979d09ae3acbd3b6a8d6e4f Mon Sep 17 00:00:00 2001 From: "Niels G. W. Serup" Date: Sat, 16 Nov 2024 21:38:53 +0100 Subject: [PATCH] Allow linebreaks in Markdown --- byg/src/Byg/Functions/Pandoc.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/byg/src/Byg/Functions/Pandoc.hs b/byg/src/Byg/Functions/Pandoc.hs index 1dd6297..ae16753 100644 --- a/byg/src/Byg/Functions/Pandoc.hs +++ b/byg/src/Byg/Functions/Pandoc.hs @@ -23,7 +23,10 @@ runPandoc m = case P.runPure m of readMarkdown :: TokenableTo Text a => a -> DepGenM (Token Pandoc) readMarkdown = onToken $ runPandoc . P.readMarkdown settings - where settings = P.def { P.readerExtensions = P.extensionsFromList [ P.Ext_raw_html ] } + where settings = P.def { P.readerExtensions = P.extensionsFromList + [ P.Ext_raw_html + , P.Ext_escaped_line_breaks + ] } writeHtml :: TokenableTo Pandoc a => a -> DepGenM (Token Text) writeHtml = onToken $ runPandoc . P.writeHtml5String P.def