sundown-0.6: Bindings to the sundown markdown library

Safe HaskellNone
LanguageHaskell98

Text.Sundown.Html

Contents

Description

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

Synopsis

Documentation

renderHtml #

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 #

Generic ByteString conversion

class ToBS a where #

Converts something to an UTF8 ByteString.

Minimal complete definition

toBS

Methods

toBS :: a -> ByteString #

Instances

ToBS ByteString # 
ToBS Text # 

Methods

toBS :: Text -> ByteString #

ToBS [Char] # 

Methods

toBS :: [Char] -> ByteString #

class FromBS a where #

Converts an UTF8 ByteString to something.

Minimal complete definition

fromBS

Methods

fromBS :: ByteString -> a #

Instances

Markdown extensions

data Extensions #

A set of switches to enable or disable markdown features.

Constructors

Extensions 

Fields

Html render modes

data HtmlRenderMode #

Constructors

HtmlRenderMode 

Fields