View Source Makeup (Makeup v1.1.0)

Syntax highlighting library for code, inspired by Pygments.

By default, it doesn't include any lexers. You must import them separately (even the Elixir lexer).

Link to this section Summary

Functions

Highlights the given string using the given lexer and formatter.

Generates a CSS stylesheet for highlighted code for the given style.

Link to this section Functions

Link to this function

highlight(source, options \\ [])

View Source

Highlights the given string using the given lexer and formatter.

By default it highlight the Elixir language using HTML

Link to this function

highlight_inner_html(source, options \\ [])

View Source
Link to this function

stylesheet(style \\ StyleMap.default_style(), css_class \\ "highlight")

View Source

Generates a CSS stylesheet for highlighted code for the given style.

It expects a style, either as an atom name or as StyleMap, and the css_class as the top level class for highlighted code.

Ff the css_class is "highlight" (the default), the stylesheet has the form:

.highlight .someclass {...}
.highlight .anotherclass {...}

See Makeup.Styles.HTML.StyleMap for all style maps.