-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Fast, accurate CommonMark (Markdown) parser and renderer
--   
--   This package provides Haskell bindings for <a>libcmark</a>, the
--   reference parser for <a>CommonMark</a>, a fully specified variant of
--   Markdown. It includes sources for libcmark (0.19.0) and does not
--   require prior installation of the C library.
--   
--   cmark provides the following advantages over existing Markdown
--   libraries for Haskell:
--   
--   <ul>
--   <li>Speed: Conversion speed is on par with the <a>sundown</a> library.
--   We were unable to measure precisely against <a>sundown</a>, which
--   raised a malloc error when compiled into our benchmark suite. Relative
--   to other implementations: cmark was 82 times faster than
--   <a>cheapskate</a>, 59 times faster than <a>markdown</a>, 105 times
--   faster than <a>pandoc</a>, and 2.8 times faster than
--   <a>discount</a>.</li>
--   <li>Memory footprint: Memory footprint is on par with <a>sundown</a>.
--   On one sample, the library uses a fourth the memory that
--   <a>markdown</a> uses, and less than a tenth the memory that
--   <a>pandoc</a> uses.</li>
--   <li>Robustness: cmark can handle whatever is thrown at it, without the
--   exponential blowups in parsing time one can sometimes get with other
--   libraries. (The input <tt>bench/full-sample.md</tt>, for example,
--   causes both <a>pandoc</a> and <a>markdown</a> to grind to a
--   halt.)</li>
--   <li>Accuracy: cmark passes the CommonMark spec's suite of over 500
--   conformance tests.</li>
--   <li>Standardization: Since there is a spec and a comprehensive suite
--   of tests, we can have a high degree of confidence that any two
--   CommonMark implementations will behave the same. Thus, for example,
--   one could use this library for server-side rendering and
--   <a>commonmark.js</a> for client-side previewing.</li>
--   <li>Ease of installation: cmark is portable and has minimal
--   dependencies.</li>
--   </ul>
--   
--   cmark does not provide Haskell versions of the whole <a>libcmark</a>
--   API, which is built around mutable <tt>cmark_node</tt> objects.
--   Instead, it provides functions for converting CommonMark to HTML (and
--   other formats), and a function for converting CommonMark to a
--   <tt>Node</tt> tree that can be processed further using Haskell.
--   
--   A note on security: This library does not attempt to sanitize HTML
--   output. We recommend using <a>xss-sanitize</a> to filter the output.
--   
--   A note on stability: There is a good chance the API will change
--   significantly after this early release.
@package cmark
@version 0.3.3.1

module CMark

-- | Convert CommonMark formatted text to Html, using cmark's built-in
--   renderer.
commonmarkToHtml :: [CMarkOption] -> Text -> Text

-- | Convert CommonMark formatted text to CommonMark XML, using cmark's
--   built-in renderer.
commonmarkToXml :: [CMarkOption] -> Text -> Text

-- | Convert CommonMark formatted text to groff man, using cmark's built-in
--   renderer.
commonmarkToMan :: [CMarkOption] -> Text -> Text

-- | Convert CommonMark formatted text to a structured <a>Node</a> tree,
--   which can be transformed or rendered using Haskell code.
commonmarkToNode :: [CMarkOption] -> Text -> Node
nodeToHtml :: [CMarkOption] -> Node -> Text
nodeToXml :: [CMarkOption] -> Node -> Text
nodeToMan :: [CMarkOption] -> Node -> Text
nodeToCommonmark :: [CMarkOption] -> Int -> Node -> Text
optSourcePos :: CMarkOption
optNormalize :: CMarkOption
optHardBreaks :: CMarkOption
optSmart :: CMarkOption
data Node
Node :: (Maybe PosInfo) -> NodeType -> [Node] -> Node
data NodeType
DOCUMENT :: NodeType
HRULE :: NodeType
PARAGRAPH :: NodeType
BLOCK_QUOTE :: NodeType
HTML :: Text -> NodeType
CODE_BLOCK :: Info -> Text -> NodeType
HEADER :: Level -> NodeType
LIST :: ListAttributes -> NodeType
ITEM :: NodeType
TEXT :: Text -> NodeType
SOFTBREAK :: NodeType
LINEBREAK :: NodeType
INLINE_HTML :: Text -> NodeType
CODE :: Text -> NodeType
EMPH :: NodeType
STRONG :: NodeType
LINK :: Url -> Title -> NodeType
IMAGE :: Url -> Title -> NodeType
data PosInfo
PosInfo :: Int -> Int -> Int -> Int -> PosInfo
startLine :: PosInfo -> Int
startColumn :: PosInfo -> Int
endLine :: PosInfo -> Int
endColumn :: PosInfo -> Int
data DelimType
PERIOD_DELIM :: DelimType
PAREN_DELIM :: DelimType
data ListType
BULLET_LIST :: ListType
ORDERED_LIST :: ListType
data ListAttributes
ListAttributes :: ListType -> Bool -> Int -> DelimType -> ListAttributes
listType :: ListAttributes -> ListType
listTight :: ListAttributes -> Bool
listStart :: ListAttributes -> Int
listDelim :: ListAttributes -> DelimType
type Url = Text
type Title = Text
type Level = Int
type Info = Text
data CMarkOption
instance Typeable DelimType
instance Typeable ListType
instance Typeable ListAttributes
instance Typeable NodeType
instance Typeable PosInfo
instance Typeable Node
instance Show DelimType
instance Read DelimType
instance Eq DelimType
instance Ord DelimType
instance Data DelimType
instance Generic DelimType
instance Show ListType
instance Read ListType
instance Eq ListType
instance Ord ListType
instance Data ListType
instance Generic ListType
instance Show ListAttributes
instance Read ListAttributes
instance Eq ListAttributes
instance Ord ListAttributes
instance Data ListAttributes
instance Generic ListAttributes
instance Show NodeType
instance Read NodeType
instance Eq NodeType
instance Ord NodeType
instance Data NodeType
instance Generic NodeType
instance Show PosInfo
instance Read PosInfo
instance Eq PosInfo
instance Ord PosInfo
instance Data PosInfo
instance Generic PosInfo
instance Show Node
instance Read Node
instance Eq Node
instance Ord Node
instance Data Node
instance Generic Node
instance Datatype D1DelimType
instance Constructor C1_0DelimType
instance Constructor C1_1DelimType
instance Datatype D1ListType
instance Constructor C1_0ListType
instance Constructor C1_1ListType
instance Datatype D1ListAttributes
instance Constructor C1_0ListAttributes
instance Selector S1_0_0ListAttributes
instance Selector S1_0_1ListAttributes
instance Selector S1_0_2ListAttributes
instance Selector S1_0_3ListAttributes
instance Datatype D1NodeType
instance Constructor C1_0NodeType
instance Constructor C1_1NodeType
instance Constructor C1_2NodeType
instance Constructor C1_3NodeType
instance Constructor C1_4NodeType
instance Constructor C1_5NodeType
instance Constructor C1_6NodeType
instance Constructor C1_7NodeType
instance Constructor C1_8NodeType
instance Constructor C1_9NodeType
instance Constructor C1_10NodeType
instance Constructor C1_11NodeType
instance Constructor C1_12NodeType
instance Constructor C1_13NodeType
instance Constructor C1_14NodeType
instance Constructor C1_15NodeType
instance Constructor C1_16NodeType
instance Constructor C1_17NodeType
instance Datatype D1PosInfo
instance Constructor C1_0PosInfo
instance Selector S1_0_0PosInfo
instance Selector S1_0_1PosInfo
instance Selector S1_0_2PosInfo
instance Selector S1_0_3PosInfo
instance Datatype D1Node
instance Constructor C1_0Node
