Haskell
Markdown in Haskell — the powerful Pandoc converter and lightweight cmark bindings. Back to the overview.
Pandoc
The universal document converter is also a Haskell library for reading and writing dozens of markup formats.
conversion
import Text.Pandoc
main :: IO ()
main = do
result <- runIO $ do
doc <- readMarkdown def "# Hello *world*"
writeHtml5String def doc
html <- handleError result
print html
cmark
Haskell bindings to the libcmark CommonMark reference parser.
CommonMark
import CMark (commonmarkToHtml)
main :: IO ()
main = putStr (commonmarkToHtml [] "# Hello *world*")