From 4c312f3d6b67a537945a85ee90d2262fa7d32a96 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 1 Feb 2009 15:57:01 +0000 Subject: [PATCH] Show line breaks in activity events summary. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2347 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3bdb6e2e..27930ac9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -116,7 +116,7 @@ module ApplicationHelper end def format_activity_description(text) - h(truncate(text.to_s, 250).gsub(%r{<(pre|code)>.*$}m, '...')) + h(truncate(text.to_s, 120).gsub(%r{[\r\n]*<(pre|code)>.*$}m, '...')).gsub(/[\r\n]+/, "
") end def distance_of_date_in_words(from_date, to_date = 0)