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


-- | Code highlighting for cmark
--   
--   Code highlighting for cmark-parsed Markdown. Takes cmark AST, returns
--   cmark AST with code blocks highlighted.
@package cmark-highlight
@version 0.2.0.0

module CMark.Highlight

-- | Highlight a document by replacing code blocks with raw HTML blocks.
--   
--   By default, the rest of the attribute line (i.e. all words after the
--   first word after <tt>~~~</tt> or <tt>```</tt>) get added as classes to
--   the container block of the code.
highlightNode :: Node -> Node

-- | The function is given code block's language (i.e. the 1st word of the
--   attribute line after <tt>~~~</tt> or <tt>```</tt>) and the rest of the
--   attribute line.
--   
--   If you don't want the classes to be derived from the attribute line,
--   make the function set <a>containerClasses</a> to <tt>[]</tt>.
highlightNodeWith :: (Text -> Text -> FormatOptions -> FormatOptions) -> Node -> Node

-- | Options for formatting source code.
data FormatOptions :: *
FormatOptions :: Bool -> Int -> Bool -> Bool -> [String] -> [String] -> FormatOptions

-- | Number lines
[numberLines] :: FormatOptions -> Bool

-- | Number of first line
[startNumber] :: FormatOptions -> Int

-- | Anchors on each line number
[lineAnchors] :: FormatOptions -> Bool

-- | Html titles with token types
[titleAttributes] :: FormatOptions -> Bool

-- | Additional classes for Html code tag
[codeClasses] :: FormatOptions -> [String]

-- | Additional classes for Html container tag (pre or table depending on
--   numberLines)
[containerClasses] :: FormatOptions -> [String]
defaultFormatOpts :: FormatOptions

-- | Returns CSS for styling highlighted code according to the given style.
styleToCss :: Style -> String
