cheapskate-highlight-0.1.0.0: Code highlighting for cheapskate

Safe HaskellNone
LanguageHaskell2010

Cheapskate.Highlight

Contents

Synopsis

Highlighting

highlightDoc :: Doc -> Doc #

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 ~~~ or ```) get added as classes to the container block of the code.

highlightDocWith :: (Text -> Text -> FormatOptions -> FormatOptions) -> Doc -> Doc #

The function is given code block's language (i.e. the 1st word of the attribute line after ~~~ or ```) 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 containerClasses to [].

Options

Styles

styleToCss :: Style -> String #