use Albino::Multi

This commit is contained in:
rick
2011-03-03 16:28:13 -08:00
parent 83c0dbaaf2
commit ecb44b50e1
3 changed files with 40 additions and 34 deletions
+11 -6
View File
@@ -1,12 +1,17 @@
require 'albino'
require 'albino/multi'
class Gollum::Albino < Albino
self.bin = ::Albino.bin
self.default_encoding = ::Albino.default_encoding
class Gollum::Albino < Albino::Multi
self.bin = ::Albino::Multi.bin
def colorize(options = {})
html = super.to_s
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
end