https://github.com/rubychan/coderay
Fast and easy syntax highlighting for selected languages, written in Ruby.
https://github.com/rubychan/coderay
Last synced: 20 days ago
JSON representation
Fast and easy syntax highlighting for selected languages, written in Ruby.
- Host: GitHub
- URL: https://github.com/rubychan/coderay
- Owner: rubychan
- License: other
- Created: 2011-07-08T23:49:05.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2024-11-02T01:22:11.000Z (5 months ago)
- Last Synced: 2025-02-24T04:11:32.325Z (about 2 months ago)
- Language: Ruby
- Homepage: http://coderay.rubychan.de/
- Size: 12.2 MB
- Stars: 850
- Watchers: 23
- Forks: 115
- Open Issues: 125
-
Metadata Files:
- Readme: README.markdown
- Changelog: Changes-pre-1.0.textile
- License: MIT-LICENSE
Awesome Lists containing this project
- awesome-ruby-toolbox - coderay - Fast and easy syntax highlighting for selected languages, written in Ruby. Comes with RedCloth integration and LOC counter. (HTML & Markup / Syntax Highlighting)
- awesome-ruby - CodeRay - Fast and easy syntax highlighting for selected languages. (Code Highlighting)
- ranger-awesome - coderay
README
# CodeRay
[](https://dl.circleci.com/status-badge/redirect/gh/rubychan/coderay/tree/master) [](https://badge.fury.io/rb/coderay) [](https://codeclimate.com/github/rubychan/coderay/maintainability)
## About
CodeRay is a Ruby library for syntax highlighting.
You put your code in, and you get it back colored; Keywords, strings, floats, comments - all in different colors. And with line numbers.
## Installation
`gem install coderay`
### Dependencies
CodeRay needs Ruby 1.8.7, 1.9.3 or 2.0+. It also runs on JRuby.
## Example Usage
```ruby
require 'coderay'html = CodeRay.scan("puts 'Hello, world!'", :ruby).div(:line_numbers => :table)
````## Documentation
See [rubydoc](http://rubydoc.info/gems/coderay).