sundown-0.6: Bindings to the sundown markdown library

Safe HaskellNone

Text.Sundown.Html

Contents

Description

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

Synopsis

Documentation

renderHtmlSource

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

class ToBS a whereSource

Converts something to an UTF8 ByteString.

Methods

toBS :: a -> ByteStringSource

Instances

class FromBS a whereSource

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

extNoIntraEmphasis :: Bool

Turn off underscores insode a word does designating emphasis.

extTables :: Bool
 
extFencedCode :: Bool

Turns on a non-indentation form of code-blocks, by blocking off a regionwith ~ or `.

extAutolink :: Bool

Turn things that look like URLs and email addresses into links

extStrikethrough :: Bool

Surround text with `~` to designate it as struck through

extSpaceHeaders :: Bool
 
extSuperscript :: Bool
 
extLaxSpacing :: Bool

Allow blocks inside of paragraphs, instead requireing tags to be on separate lines

Html render modes

data HtmlRenderMode Source

Constructors

HtmlRenderMode 

Fields

htmlSkipHtml :: Bool

Drop in-line HTML tags from the output

htmlSkipStyle :: Bool

Don't add any style tags to the output

htmlSkipImages :: Bool

Don't include images in the output

htmlSkipLinks :: Bool

Don't include links in the output

htmlExpandTabs :: Bool
 
htmlSafelink :: Bool

Sanity check links for known URL schemes

htmlToc :: Bool

Include a table of contents in the output

htmlHardWrap :: Bool
 
htmlUseXhtml :: Bool

Produce XHTML output instead of HTML

htmlEscape :: Bool