| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Text.Sundown.Html
Description
Module exposing a generic class to convert to/from UTF8 ByteStrings, and the
corresponding generic markdown functions.
Synopsis
- 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 -> b Source #
Generic ByteString conversion
Converts something to an UTF8 ByteString.
Methods
toBS :: a -> ByteString Source #
Instances
| ToBS ByteString Source # | |
Defined in Text.Sundown.Html Methods toBS :: ByteString -> ByteString Source # | |
| ToBS Text Source # | |
Defined in Text.Sundown.Html Methods toBS :: Text -> ByteString Source # | |
| ToBS [Char] Source # | |
Defined in Text.Sundown.Html Methods toBS :: [Char] -> ByteString Source # | |
Converts an UTF8 ByteString to something.
Methods
fromBS :: ByteString -> a Source #
Instances
| FromBS ByteString Source # | |
Defined in Text.Sundown.Html Methods fromBS :: ByteString -> ByteString Source # | |
| FromBS Text Source # | |
Defined in Text.Sundown.Html Methods fromBS :: ByteString -> Text Source # | |
| FromBS [Char] Source # | |
Defined in Text.Sundown.Html Methods fromBS :: ByteString -> [Char] Source # | |
Markdown extensions
data Extensions Source #
A set of switches to enable or disable markdown features.
Constructors
| Extensions | |
Fields
| |
allExtensions :: Extensions Source #
All Extensions enabled
noExtensions :: Extensions Source #
All Extensions disabled
Html render modes
data HtmlRenderMode Source #
Constructors
| HtmlRenderMode | |
Fields
| |
noHtmlModes :: HtmlRenderMode Source #
All the HtmlRenderMode disabled
allHtmlModes :: HtmlRenderMode Source #
All the HtmlRenderMode enabled