Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sbfaulkner-pygmalion

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sbfaulkner-pygmalion

  • 0.9.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

pygmalion

Syntax highlighting using the pygments.com "web service".

WHY?

I have historically used ultraviolet for any syntax highlighting. However, in order to use ultraviolet, you need to be able to use the oniguruma library. Unfortunately, some hosting services (like the Media Temple grid service) do not support this library. I needed another solution, and it seemed like something that could be outsourced.

Installation

Run the following if you haven't already:

$ gem sources -a http://gems.github.com

Install the gem(s):

$ sudo gem install -r sbfaulkner-pygmalion

Usage

In ruby...

require 'pygmalion'
...
string.highlight
string.highlight(:language => 'js')
string.highlight(:language => 'rb', :line_numbers => true)

From the command-line...

pygmalion

Example

File.read('hello.rb').highlight

Results in...

<div class="highlight"><pre><span class="k">def</span> <span class="nf">hello</span>
  <span class="n">puts</span> <span class="s">&quot;hello&quot;</span>
<span class="n">end</span>
</pre></div>'

Author: S. Brent Faulkner brentf@unwwwired.net
License: Copyright © 2008 unwwwired.net, released under the MIT license

FAQs

Package last updated on 10 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc