Safe Haskell | None |
---|
Module exposing a generic class to convert to/from UTF8 ByteString
s, and the
corresponding generic markdown functions.
- renderHtml :: (ToBS a, FromBS b) => Extensions -> HtmlRenderMode -> Bool -> Maybe Int -> a -> b
- smartypants :: (ToBS a, FromBS b) => a -> b
- class ToBS a where
- toBS :: a -> ByteString
- class FromBS a where
- fromBS :: ByteString -> a
- data Extensions = Extensions {}
- allExtensions :: Extensions
- noExtensions :: Extensions
- data HtmlRenderMode = HtmlRenderMode {
- htmlSkipHtml :: Bool
- htmlSkipStyle :: Bool
- htmlSkipImages :: Bool
- htmlSkipLinks :: Bool
- htmlExpandTabs :: Bool
- htmlSafelink :: Bool
- htmlToc :: Bool
- htmlHardWrap :: Bool
- htmlUseXhtml :: Bool
- htmlEscape :: Bool
- noHtmlModes :: HtmlRenderMode
- allHtmlModes :: HtmlRenderMode
Documentation
:: (ToBS a, FromBS b) | |
=> Extensions | |
-> HtmlRenderMode | |
-> Bool | If true, smartypant the output |
-> Maybe Int | The maximum nesting of the HTML. If Nothing, a default value (16) will be used. |
-> a | |
-> b |
Parses markdown, returns the Html.
smartypants :: (ToBS a, FromBS b) => a -> bSource
Generic ByteString conversion
Converts something to an UTF8 ByteString
.
toBS :: a -> ByteStringSource
Converts an UTF8 ByteString
to something.
fromBS :: ByteString -> aSource
Markdown extensions
data Extensions Source
A set of switches to enable or disable markdown features.
Extensions | |
|
allExtensions :: ExtensionsSource
All Extensions
enabled
noExtensions :: ExtensionsSource
All Extensions
disabled
Html render modes
data HtmlRenderMode Source
HtmlRenderMode | |
|
noHtmlModes :: HtmlRenderModeSource
All the HtmlRenderMode
disabled
allHtmlModes :: HtmlRenderModeSource
All the HtmlRenderMode
enabled