Revert "Switch to albino for now, pygments.rb is segfaulting on heroku"
This reverts commit 3dcb9cd05d
.
This commit is contained in:
parent
787fafd49d
commit
c1ebf108af
3 changed files with 19 additions and 7 deletions
2
Gemfile
2
Gemfile
|
@ -13,5 +13,5 @@ gem 'mime-types'
|
||||||
gem 'rack'
|
gem 'rack'
|
||||||
gem 'puma'
|
gem 'puma'
|
||||||
gem 'rack-rewrite'
|
gem 'rack-rewrite'
|
||||||
gem 'albino'
|
gem 'pygments.rb', :git => 'git://github.com/akzhan/pygments.rb.git', :branch => 'rubypython-0.6'
|
||||||
gem 'clogger'
|
gem 'clogger'
|
||||||
|
|
18
Gemfile.lock
18
Gemfile.lock
|
@ -1,29 +1,39 @@
|
||||||
|
GIT
|
||||||
|
remote: git://github.com/akzhan/pygments.rb.git
|
||||||
|
revision: dfa0d936da40f25e249a7d20f895e6d4cab72b50
|
||||||
|
branch: rubypython-0.6
|
||||||
|
specs:
|
||||||
|
pygments.rb (0.2.12)
|
||||||
|
rubypython (~> 0.6.1)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
adsf (1.1.1)
|
adsf (1.1.1)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
albino (1.3.3)
|
blankslate (2.1.2.4)
|
||||||
posix-spawn (>= 0.3.6)
|
|
||||||
builder (3.0.0)
|
builder (3.0.0)
|
||||||
clogger (1.1.0)
|
clogger (1.1.0)
|
||||||
rack (> 0.9)
|
rack (> 0.9)
|
||||||
colored (1.2)
|
colored (1.2)
|
||||||
cri (2.3.0)
|
cri (2.3.0)
|
||||||
colored (>= 1.2)
|
colored (>= 1.2)
|
||||||
|
ffi (1.0.11)
|
||||||
mime-types (1.19)
|
mime-types (1.19)
|
||||||
nanoc (3.4.0)
|
nanoc (3.4.0)
|
||||||
cri (~> 2.2)
|
cri (~> 2.2)
|
||||||
nanoc-cachebuster (0.3.1)
|
nanoc-cachebuster (0.3.1)
|
||||||
nanoc (>= 3.3.0)
|
nanoc (>= 3.3.0)
|
||||||
nokogiri (1.5.5)
|
nokogiri (1.5.5)
|
||||||
posix-spawn (0.3.6)
|
|
||||||
puma (1.6.1)
|
puma (1.6.1)
|
||||||
rack (~> 1.2)
|
rack (~> 1.2)
|
||||||
rack (1.4.1)
|
rack (1.4.1)
|
||||||
rack-rewrite (1.2.1)
|
rack-rewrite (1.2.1)
|
||||||
rainpress (1.0)
|
rainpress (1.0)
|
||||||
redcarpet (2.1.1)
|
redcarpet (2.1.1)
|
||||||
|
rubypython (0.6.2)
|
||||||
|
blankslate (>= 2.1.2.3)
|
||||||
|
ffi (~> 1.0.7)
|
||||||
slim (1.2.2)
|
slim (1.2.2)
|
||||||
temple (~> 0.4.0)
|
temple (~> 0.4.0)
|
||||||
tilt (~> 1.3.3)
|
tilt (~> 1.3.3)
|
||||||
|
@ -35,7 +45,6 @@ PLATFORMS
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
adsf
|
adsf
|
||||||
albino
|
|
||||||
builder
|
builder
|
||||||
clogger
|
clogger
|
||||||
mime-types
|
mime-types
|
||||||
|
@ -43,6 +52,7 @@ DEPENDENCIES
|
||||||
nanoc-cachebuster
|
nanoc-cachebuster
|
||||||
nokogiri
|
nokogiri
|
||||||
puma
|
puma
|
||||||
|
pygments.rb!
|
||||||
rack
|
rack
|
||||||
rack-rewrite
|
rack-rewrite
|
||||||
rainpress
|
rainpress
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
require 'albino'
|
require 'pygments.rb'
|
||||||
|
|
||||||
|
RubyPython.start python_exe: 'python2.6' if ENV['RACK_ENV'] == 'production'
|
||||||
|
|
||||||
class MarkdownHTML < Redcarpet::Render::HTML
|
class MarkdownHTML < Redcarpet::Render::HTML
|
||||||
include Redcarpet::Render::SmartyPants
|
include Redcarpet::Render::SmartyPants
|
||||||
|
|
||||||
def block_code(code, language)
|
def block_code(code, language)
|
||||||
language ? Albino.colorize(code, language) : code
|
Pygments.highlight(code, lexer: language)
|
||||||
end
|
end
|
||||||
|
|
||||||
def table(header, body)
|
def table(header, body)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue