Run pandoc on text instead of file
This commit is contained in:
@@ -51,8 +51,7 @@ evalFunctionIO f x = case (f, x) of
|
||||
createDirectory s
|
||||
pure Empty
|
||||
|
||||
(RunPandoc, String (StringWrapper s)) -> do
|
||||
contents <- T.readFile s
|
||||
(RunPandoc, Text contents) -> do
|
||||
html <- P.runIOorExplode (P.writeHtml5 P.def =<< P.readMarkdown (P.def { P.readerExtensions = P.extensionsFromList [ P.Ext_raw_html ] }) contents)
|
||||
pure $ Text $ TL.toStrict $ B.renderHtml html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user