Merged r9389 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@9402 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-04-14 04:57:13 +00:00
parent 59f14478ed
commit baa4ebd05f
3 changed files with 38 additions and 41 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ module Redmine
# Should not return line numbers nor outer pre tag
def highlight_by_filename(text, filename)
language = ::CodeRay::FileType[filename]
language ? ::CodeRay.scan(text, language).html : ERB::Util.h(text)
language ? ::CodeRay.scan(text, language).html(:break_lines => true) : ERB::Util.h(text)
end
# Highlights +text+ using +language+ syntax