pygments

Syntax hightlight using Python's [Pygments](http://pygments.org) library


Keywords
elixir, pygments, syntax-highlighting
License
Unlicense

Documentation

ExPygments

Syntax hightlight using Pygments

Preinstall

ExPygments requires python3 pygments package in able to work.

pip install pygments

Installation

{:expygments, github: "nipinium/expygments"}

Usage

# highlight(source, language \\ "text")
html = ExPygments.highlight("defmodule Bar do\nend\n", "elixir")

# For source code parsed through a markdown engine:
# highlight_escaped(source, language)
html = ExPygments.highlight_escaped("<tag>", "html")

License

UNLICENSE