Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Pygments bundled as a gem with a Ruby wrapper.
branch: master

This branch is even with hotovson:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
autotest
lib
pygments
spec
.gitignore
.rspec
Gemfile
Gemfile.lock
README.markdown
Rakefile
pygmentize.py
pygments.gemspec

README.markdown

Pygments

Pygments is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code.

Pygments is the defacto-standard syntax highlighter, supporting a large range of languages, including the newer and lesser known, like CoffeeScript and Factor. Pygments is written in Python, this gem provides a wrapper written in Ruby.

Alternatives

  • Albino is a wrapper around the pygmentize command-line, open sourced by GitHub.
  • CodeRay is a Ruby native syntax highlighter. It's fast but supports few languages. (GitHub mirror)
  • SyntaxHighlighter is a syntax highlighter written in JavaScript, capable of running both on the client and server.
  • GeSHi is a syntax highlighter for PHP.

Proof of Concept

The Pygments gem is a proof of concept presently based on Albino. It bundles in the Python code for Pygments, allowing it to run on Ruby host Heroku, as well as making installation more Rubyish.

See the documentation for Albino, but note that this will change.

Note: The purpose of this gem is to provide a Ruby interface to Pygments. If you are looking for a command line interface (CLI), it is suggested that you install Pygments in the usual way and use pygmentize. (this may change)

Something went wrong with that request. Please try again.