Permalink
Browse files

Allow custom pygmentize path

  • Loading branch information...
nakajima committed May 30, 2009
1 parent 4942195 commit 58a1e1629eda2e552bbf1042e7809896ca4c6fac
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/makers-mark/generator.rb
  2. +1 −1 makers-mark.gemspec
  3. +1 −1 vendor/albino.rb
@@ -18,9 +18,9 @@ def doc
def highlight!
doc.search('div.code').each do |div|
lexer = div['rel'] || :ruby
-
+
lexted_text = Albino.new(div.text, lexer).to_s
-
+
highlighted = Nokogiri::HTML(lexted_text).at('div')
klasses = highlighted['class'].split(/\s+/)
View
@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = %q{makers-mark}
- s.version = "0.0.4"
+ s.version = "0.0.5"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Pat Nakajima"]
View
@@ -44,7 +44,7 @@
require 'open4'
class Albino
- @@bin = '/usr/local/bin/pygmentize'
+ @@bin = ENV['PYGMENTIZE_BIN'] || '/usr/local/bin/pygmentize'
def self.bin=(path)
@@bin = path

0 comments on commit 58a1e16

Please sign in to comment.