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

eabc13c · Nov 2, 2024
Nov 2, 2024
Sep 3, 2017
Apr 21, 2015
May 30, 2020
Nov 24, 2019
Nov 24, 2019
Feb 21, 2021
Nov 24, 2019
Nov 2, 2017
Nov 24, 2019
Nov 24, 2019
Nov 24, 2019
Nov 13, 2022
Mar 10, 2013
Oct 26, 2011
May 30, 2020
Jun 2, 2016
May 30, 2020
Jun 24, 2020
Nov 2, 2024
Aug 19, 2011
Aug 30, 2013
Jun 18, 2020

Repository files navigation

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.