ruby1.8 compatibility
This commit is contained in:
@@ -401,7 +401,7 @@ module Gollum
|
||||
end
|
||||
|
||||
highlighted = begin
|
||||
encoding ||= Encoding::UTF_8
|
||||
encoding ||= 'utf-8'
|
||||
blocks.map { |lang, code| Pygments.highlight(code, :lexer => lang, :options => {:encoding => encoding.to_s}) }
|
||||
rescue ::RubyPython::PythonError
|
||||
[]
|
||||
|
||||
+1
-1
@@ -432,7 +432,7 @@ context "Markup" do
|
||||
index.commit("Add alpha.jpg")
|
||||
|
||||
page = @wiki.page("Bilbo Baggins")
|
||||
rendered = Gollum::Markup.new(page).render(false, Encoding::UTF_8)
|
||||
rendered = Gollum::Markup.new(page).render(false, 'utf-8')
|
||||
assert_equal output, rendered
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user