Safe Haskell | None |
---|
Rewrite/simplification of yesod-markdown written by ajdunlap.
Forked from https://github.com/ajdunlap/yesod-markdown.
- newtype Markdown = Markdown {
- unMarkdown :: Text
- markdownToHtml :: Markdown -> Html
- markdownToHtmlTrusted :: Markdown -> Html
- markdownFromFile :: FilePath -> IO Markdown
- parseMarkdown :: ReaderOptions -> Markdown -> Pandoc
- writePandoc :: WriterOptions -> Pandoc -> Html
- writePandocTrusted :: WriterOptions -> Pandoc -> Html
- yesodDefaultWriterOptions :: WriterOptions
- yesodDefaultReaderOptions :: ReaderOptions
- markdownField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Markdown
Documentation
Wrappers
markdownToHtml :: Markdown -> HtmlSource
markdownToHtmlTrusted :: Markdown -> HtmlSource
No HTML sanitization
markdownFromFile :: FilePath -> IO MarkdownSource
Returns the empty string if the file does not exist
Conversions
parseMarkdown :: ReaderOptions -> Markdown -> PandocSource
writePandoc :: WriterOptions -> Pandoc -> HtmlSource
writePandocTrusted :: WriterOptions -> Pandoc -> HtmlSource
Option sets
yesodDefaultWriterOptions :: WriterOptionsSource
Defaults plus Html5, minus WrapText
yesodDefaultReaderOptions :: ReaderOptionsSource
Defaults plus Smart and ParseRaw
Form helper
markdownField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m MarkdownSource