Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mischov/pearly

Pearly is an Elixir library for syntax highlighting using Sublime Text syntax definitions.
https://github.com/mischov/pearly

elixir highlighting syntax syntect

Last synced: 3 months ago
JSON representation

Pearly is an Elixir library for syntax highlighting using Sublime Text syntax definitions.

Awesome Lists containing this project

README

        

# Pearly

[![Build Status](https://travis-ci.org/mischov/pearly.svg?branch=master)](https://travis-ci.org/mischov/pearly)
[![Pearly version](https://img.shields.io/hexpm/v/pearly.svg)](https://hex.pm/packages/pearly)

> Pearly Soames wanted gold and silver, but not, in the way of common thieves, for wealth. He wanted them because they shone and were pure. Strange, afflicted, and deformed, he sought a cure in the abstract relation of colors.
> -- Mark Helprin, *Winter's Tale*

Pearly is an Elixir library for syntax highlighting using Sublime Text syntax definitions.

```elixir
Pearly.highlight("html", "

Hello, World!

",
format: :html,
theme: "Solarized (dark)")
#=> {:ok, "
\n 0.1.1"}

]
end
```

Finally, run `mix deps.get`.

## Roadmap

- [x] Highlight for HTML pages (styled `

` tags)

- [x] Highlight for the terminal (24-bit color ANSI terminal escape sequences)
- [x] Provide Elixir and EEx syntaxes
- [ ] Support providing additional syntaxes
- [ ] Support providing additional themes
- [ ] Support additional and/or custom formatters

## License

Pearly is licensed under the [MIT License](LICENSE)