update to albino v1.3.2
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
||||
|
||||
s.add_dependency('grit', "~> 2.4.1")
|
||||
s.add_dependency('github-markup', [">= 0.4.0", "< 1.0.0"])
|
||||
s.add_dependency('albino', "~> 1.3.0")
|
||||
s.add_dependency('albino', "~> 1.3.2")
|
||||
s.add_dependency('sinatra', "~> 1.0")
|
||||
s.add_dependency('mustache', [">= 0.11.2", "< 1.0.0"])
|
||||
s.add_dependency('sanitize', "~> 2.0.0")
|
||||
|
||||
@@ -2,16 +2,4 @@ require 'albino/multi'
|
||||
|
||||
class Gollum::Albino < Albino::Multi
|
||||
self.bin = ::Albino::Multi.bin
|
||||
|
||||
def colorize(options = {})
|
||||
case out = super
|
||||
when Array then out.each { |s| fix_html(s) }
|
||||
else fix_html(out)
|
||||
end
|
||||
end
|
||||
|
||||
def fix_html(html)
|
||||
html.sub!(%r{</pre></div>\Z}, "</pre>\n</div>")
|
||||
html
|
||||
end
|
||||
end
|
||||
|
||||
@@ -396,8 +396,8 @@ module Gollum
|
||||
|
||||
highlighted = begin
|
||||
blocks.size.zero? ? [] : Gollum::Albino.colorize(blocks)
|
||||
rescue ::Albino::ShellArgumentError, ::POSIX::Spawn::TimeoutExceeded,
|
||||
::POSIX::Spawn::MaximumOutputExceeded
|
||||
rescue ::Albino::ShellArgumentError, ::Albino::TimeoutExceeded,
|
||||
::Albino::MaximumOutputExceeded
|
||||
[]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user