Skip to content

Phrogz/coderay

 
 

Repository files navigation

CodeRay Build Status Gem Version

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+ or 1.9.2+. It also runs on Rubinius and JRuby.

Example Usage

require 'coderay'

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

Documentation

See http://coderay.rubychan.de/doc/.

About

Fast and easy syntax highlighting for selected languages, written in Ruby.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%