merge latest tweaks to master

This commit is contained in:
rick
2010-11-09 12:39:28 -08:00
37 changed files with 780 additions and 55 deletions
+14 -1
View File
@@ -116,6 +116,19 @@ module Gollum
@blob && @blob.data
end
# Public: A text data encoded in specified encoding.
#
# encoding - An Encoding or nil
#
# Returns a character encoding aware String.
def text_data(encoding=nil)
if raw_data.respond_to?(:encoding)
raw_data.force_encoding(encoding || Encoding::UTF_8)
else
raw_data
end
end
# Public: The formatted contents of the page.
#
# Returns the String data.
@@ -344,4 +357,4 @@ module Gollum
end
end
end
end
end