summaryrefslogtreecommitdiffstats
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 748a1d7e9..113b1d395 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])/, "<a href='/issues/show/\\1'>#\\1</a>\\2")
end
def error_messages_for(object_name, options = {})