Allow linebreaks in Markdown

This commit is contained in:
Niels G. W. Serup 2024-11-16 21:38:53 +01:00
parent 3c393b525b
commit 30bf917e1c
No known key found for this signature in database
GPG Key ID: 38EEEBCE67324F19
1 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,10 @@ runPandoc m = case P.runPure m of
readMarkdown :: TokenableTo Text a => a -> DepGenM (Token Pandoc) readMarkdown :: TokenableTo Text a => a -> DepGenM (Token Pandoc)
readMarkdown = onToken $ runPandoc . P.readMarkdown settings 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 :: TokenableTo Pandoc a => a -> DepGenM (Token Text)
writeHtml = onToken $ runPandoc . P.writeHtml5String P.def writeHtml = onToken $ runPandoc . P.writeHtml5String P.def