-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Convert Markdown to HTML, with XSS protection -- -- This library leverages existing high-performance libraries -- (attoparsec, blaze-html, text, and conduit), and should integrate well -- with existing codebases. @package markdown @version 0.1.0 module Text.Markdown -- | Convert the given textual markdown content to HTML. -- --
--   >>> :set -XOverloadedStrings
--   
--   >>> import Text.Blaze.Html.Renderer.Text
--   
--   >>> renderHtml $ markdown def "# Hello World!"
--   "<h1>Hello World!</h1>"
--   
-- --
--   >>> renderHtml $ markdown def { msXssProtect = False } "<script>alert('evil')</script>"
--   "<script>alert('evil')</script>"
--   
markdown :: MarkdownSettings -> Text -> Html -- | A settings type providing various configuration options. -- -- See http://www.yesodweb.com/book/settings-types for more -- information on settings types. In general, you can use def. data MarkdownSettings -- | Whether to automatically apply XSS protection to embedded HTML. -- Default: True. msXssProtect :: MarkdownSettings -> Bool -- | A newtype wrapper providing a ToHtml instance. newtype Markdown Markdown :: Text -> Markdown -- | The default value for this type. def :: Default a => a instance ToMarkup Markdown instance Default MarkdownSettings