Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/mischov/pearly
- Owner: mischov
- License: mit
- Created: 2017-09-13T22:36:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-22T23:51:35.000Z (over 7 years ago)
- Last Synced: 2024-03-14T23:47:14.804Z (10 months ago)
- Topics: elixir, highlighting, syntax, syntect
- Language: Elixir
- Homepage:
- Size: 280 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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)