• Stars
    star
    847
  • Rank 53,812 (Top 2 %)
  • Language
    Ruby
  • License
    Other
  • Created over 13 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

CodeRay

CircleCI Gem Version 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

require 'coderay'

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

Documentation

See rubydoc.