Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Ruby gem that vendors Pygments

branch: master

Tests for CLI options functionality

Options generator is now in its own function for ease in testing.
latest commit 58b9230667
Eric eric-wood authored January 02, 2014
Octocat-spinner-32 bin Rename Pygments to Pygmentize and add bin/pygmentize. November 30, 2010
Octocat-spinner-32 lib Tests for CLI options functionality January 02, 2014
Octocat-spinner-32 test Tests for CLI options functionality January 02, 2014
Octocat-spinner-32 vendor Remove .hg dir in pygments folder December 31, 2013
Octocat-spinner-32 .gitignore Ignore pyc files May 12, 2011
Octocat-spinner-32 LICENSE Initial import. November 24, 2010
Octocat-spinner-32 README.md Update README.md September 13, 2013
Octocat-spinner-32 Rakefile Improve cleanup task. November 30, 2010
Octocat-spinner-32 pygmentize.gemspec Formatting changes to gemspec January 02, 2014
README.md

Pygmentize

A standalone Pygments for Ruby.

require "pygmentize"

source = "function foo() { return 'bar'; }"

Pygmentize.process(source, :javascript)

Additional parameters will be passed as command line options, for example:

Pygmentize.process(source, :javascript, linenos: 'table')

You can also use the binary from the command line:

$ pygmentize -l javascript somefile.js

You need to have Python installed.

License

Copyright (c) 2010 Damian Janowski & Michel Martens

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.