yesod-rst-0.2: Tools for using reStructuredText (RST) in a yesod application

Safe HaskellNone

Yesod.RST

Contents

Description

This module provides the functionallity to use pandocs reader for reStructuredText (RST) in Yesod. The code bases heavily on yesod-markdown from Patrick Brisbin, which does the same thing for Markdown.

Synopsis

Documentation

newtype RST Source

Constructors

RST String 

Wrappers

rstToHtml :: RST -> HtmlSource

Converts RST to sanitizied Html

rstToHtmlTrusted :: RST -> HtmlSource

Converts RST to unsanitizied Html

rstFromFile :: FilePath -> IO RSTSource

Reads RST in from the specified file; returns the empty string if the file does not exist

Conversions

parseRST :: ParserState -> RST -> PandocSource

Parses Markdown into the intermediate Pandoc type

writePandoc :: WriterOptions -> Pandoc -> HtmlSource

Converts the intermediate Pandoc type to Html. Sanitizes HTML.

writePandocTrusted :: WriterOptions -> Pandoc -> HtmlSource

Skips the sanitization and its required conversion to Text

Option sets

yesodDefaultWriterOptions :: WriterOptionsSource

Pandoc defaults, plus Html5, minus WrapText

yesodDefaultParserState :: ParserStateSource

Pandoc defaults, plus Smart, plus ParseRaw

Form helper