Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Syntax highlighting for strings and stuff

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 vendor
Octocat-spinner-32 README.textile
README.textile

syntaxily

Syntax highlighting for strings and stuff.

Usage

Super simple usage:

“def foo; :bar end”.syntaxify(:ruby)

More advanced usage:

Syntaxily.parse <<-HTML
  <h1>Here's some code:</h1>
  <pre class="code" rel="ruby">def foo; :bar end

HTML

Credits

  • Uses the pygments library, and the Albino Ruby wrapper.
  • Parses syntaxable bits out of markup using Nokogiri.
  • Everything else by Pat Nakajima.
Something went wrong with that request. Please try again.