An open API service indexing awesome lists of open source software.

https://github.com/n-pn/expygments

Syntax highlight for Elixir using pygments
https://github.com/n-pn/expygments

elixir pygments syntax-highlighting

Last synced: 2 months ago
JSON representation

Syntax highlight for Elixir using pygments

Awesome Lists containing this project

README

          

# ExPygments

Syntax highlight using [Pygments](http://pygments.org)

## Preinstall

ExPygments requires python3 `pygments` package in able to work.

```sh
pip3 install pygments
```

## Installation

```elixir
{:pygments, "~> 1.0"}
```

## Usage

```elixir
# 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