sundown-0.6: Bindings to the sundown markdown library
Safe HaskellNone
LanguageHaskell98

Text.Sundown.Html

Description

Module exposing a generic class to convert to/from UTF8 ByteStrings, and the corresponding generic markdown functions.

Synopsis

Documentation

renderHtml Source #

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

class ToBS a where Source #

Converts something to an UTF8 ByteString.

Methods

toBS :: a -> ByteString Source #

Instances

Instances details
ToBS ByteString Source # 
Instance details

Defined in Text.Sundown.Html

ToBS Text Source # 
Instance details

Defined in Text.Sundown.Html

Methods

toBS :: Text -> ByteString Source #

ToBS [Char] Source # 
Instance details

Defined in Text.Sundown.Html

Methods

toBS :: [Char] -> ByteString Source #

class FromBS a where Source #

Converts an UTF8 ByteString to something.

Methods

fromBS :: ByteString -> a Source #

Instances

Instances details
FromBS ByteString Source # 
Instance details

Defined in Text.Sundown.Html

FromBS Text Source # 
Instance details

Defined in Text.Sundown.Html

FromBS [Char] Source # 
Instance details

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

Html render modes

data HtmlRenderMode Source #

Constructors

HtmlRenderMode 

Fields