From 2e31311e3c9d00030ae295fcbab52ae4d7bb7225 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 25 Feb 2007 19:40:57 +0000 Subject: [PATCH] "#id" patterns are turned into links to issues in descriptions and commit messages git-svn-id: http://redmine.rubyforge.org/svn/trunk@274 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 748a1d7e..113b1d39 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -93,7 +93,9 @@ module ApplicationHelper end def textilizable(text) - (Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize") ? RedCloth.new(h(text)).to_html : simple_format(auto_link(h(text))) + text = (Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize") ? RedCloth.new(h(text)).to_html : simple_format(auto_link(h(text))) + # turn "#id" patterns into links to issues + text = text.gsub(/#(\d+)([^;\d])/, "#\\1\\2") end def error_messages_for(object_name, options = {})