Commit 2e31311e authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

"#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
parent 32782a7f
......@@ -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])/, "<a href='/issues/show/\\1'>#\\1</a>\\2")
end
def error_messages_for(object_name, options = {})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment