Skip to content
forked from github/albino

Ruby wrapper for the Pygments syntax highlighter.

License

Notifications You must be signed in to change notification settings

austinbv/albino

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Albino: a ruby wrapper for pygmentize

This project is an extraction from GitHub.

For this and other extractions, see http://github.com/github

Installation

sudo easy_install pygments
gem install albino

Usage

Simple

require 'albino'
puts Albino.colorize('puts "Hello World"', :ruby)

Advanced

require 'albino'
@syntaxer = Albino.new(File.new('albino.rb'), :ruby, :bbcode)
puts @syntaxer.colorize

You can also include options for the parser

require 'albino'
Albino.colorize('puts "Hello World"', :ruby, :html, 'utf-8', "linenos=True")

Multi

require 'albino/multi'
ruby, python = Albino::Multi.colorize([ ['1+2',:ruby], ['1-2',:python] ])

About

Ruby wrapper for the Pygments syntax highlighter.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%