ExPygments
Syntax hightlight using Pygments
Preinstall
ExPygments requires python3 pygments package in able to work.
pip3 install pygmentsInstallation
{:pygments, github: "nipinium/expygments"}Usage
# highlight(source, language \\ "text")
html = Pygments.highlight("defmodule Bar do\nend\n", "elixir")
# For source code parsed through a markdown engine:
# highlight_escaped(source, language)
html = Pygments.highlight_escaped("<tag>", "html")License
UNLICENSE