cmark-0.5.5.1: Fast, accurate CommonMark (Markdown) parser and renderer

Safe HaskellNone
LanguageHaskell2010

CMark

Synopsis

Documentation

commonmarkToHtml :: [CMarkOption] -> Text -> Text

Convert CommonMark formatted text to Html, using cmark's built-in renderer.

commonmarkToXml :: [CMarkOption] -> Text -> Text

Convert CommonMark formatted text to CommonMark XML, using cmark's built-in renderer.

commonmarkToMan :: [CMarkOption] -> Maybe Int -> Text -> Text

Convert CommonMark formatted text to groff man, using cmark's built-in renderer.

commonmarkToLaTeX :: [CMarkOption] -> Maybe Int -> Text -> Text

Convert CommonMark formatted text to latex, using cmark's built-in renderer.

commonmarkToNode :: [CMarkOption] -> Text -> Node

Convert CommonMark formatted text to a structured Node tree, which can be transformed or rendered using Haskell code.

optSourcePos :: CMarkOption

Include a data-sourcepos attribute on block elements.

optNormalize :: CMarkOption

Normalize the document by consolidating adjacent text nodes.

optHardBreaks :: CMarkOption

Render softbreak elements as hard line breaks.

optSmart :: CMarkOption

Convert straight quotes to curly, --- to em-dash, -- to en-dash.

optSafe :: CMarkOption

Suppress rendering of raw HTML and potentially dangerous URLs in links and images.

data Node

Constructors

Node (Maybe PosInfo) NodeType [Node] 

type Url = Text

type Title = Text

type Level = Int

type Info = Text