Skip to content

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

Notifications You must be signed in to change notification settings

rubychan/coderay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

973fc94 · Feb 13, 2016
Jun 30, 2013
Apr 21, 2015
Feb 13, 2016
Sep 20, 2013
Sep 20, 2013
Jun 30, 2013
Feb 13, 2016
Mar 10, 2013
Oct 26, 2011
Feb 13, 2016
Dec 15, 2011
Feb 13, 2016
Jun 21, 2012
Nov 12, 2014
Aug 19, 2011
Aug 30, 2013
Feb 8, 2013

Repository files navigation

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.