| Safe Haskell | None |
|---|
Text.Sundown.Html
Description
Module exposing a generic class to convert to/from UTF8 ByteStrings, 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
Arguments
| :: (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.
Methods
toBS :: a -> ByteStringSource
Converts an UTF8 ByteString to something.
Methods
fromBS :: ByteString -> aSource
Markdown extensions
data Extensions Source
A set of switches to enable or disable markdown features.
Constructors
| Extensions | |
Fields
| |
allExtensions :: ExtensionsSource
All Extensions enabled
noExtensions :: ExtensionsSource
All Extensions disabled
Html render modes
data HtmlRenderMode Source
Constructors
| HtmlRenderMode | |
Fields
| |
noHtmlModes :: HtmlRenderModeSource
All the HtmlRenderMode disabled
allHtmlModes :: HtmlRenderModeSource
All the HtmlRenderMode enabled