sundown-0.5.3: Bindings to the sundown markdown library

Safe HaskellNone




Warning: you should not need to use this module, if you're storing your text sanely. Use Text.Sundown.Html.String or Text.Sundown.Html.Text so that you won't have to worry about text encoding.

If you really want to use ByteStrings directly, make sure that they are UTF-8.





:: ByteString 
-> 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.

-> ByteString 

Parses a ByteString containing the markdown, returns the Html code.

Markdown extensions

data Extensions Source

A set of switches to enable or disable markdown features.




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




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