n-pn / expygments

Syntax highlight for Elixir using pygments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExPygments

Syntax highlight using Pygments

Preinstall

ExPygments requires python3 pygments package in able to work.

pip3 install pygments

Installation

{:pygments, "~> 1.0"}

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

About

Syntax highlight for Elixir using pygments

License:The Unlicense


Languages

Language:Elixir 86.4%Language:Python 13.6%