This repository has been archived by the owner. It is now read-only.
Fast and easy syntax highlighting for selected languages, written in Ruby.
Pull request Compare This branch is 90 commits behind rubychan:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bench
bin
lib
rake_tasks
test
.gitignore
.travis.yml
CREDITS.textile
Changes-pre-1.0.textile
Changes.textile
FOLDERS
Gemfile
MIT-LICENSE.txt
README.markdown
README_INDEX.rdoc
Rakefile
coderay.gemspec

README.markdown

CodeRay

Build Status Gem Version Dependency Status

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

require 'coderay'

html = CodeRay.scan("puts 'Hello, world!'", :ruby).div(:line_numbers => :table)

Documentation

See rubydoc.