summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-04 21:30:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-04 21:30:12 +0000
commitcd824c6ecf38c030603cec4a8c035fb2071421fc (patch)
treea2aee217a05b6847f01d42b6be12f4a421891327 /app
parent4db45b8ceddfa77e1935b7a4f1939b33d11244aa (diff)
downloadredmine-cd824c6ecf38c030603cec4a8c035fb2071421fc.tar.gz
redmine-cd824c6ecf38c030603cec4a8c035fb2071421fc.zip
Redmine links regexp fix (#1369, url hash turned into a ticket link).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1492 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 589b054f3..405c5bf44 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -298,7 +298,7 @@ module ApplicationHelper
# source:some/file#L120 -> Link to line 120 of the file
# source:some/file@52#L120 -> Link to line 120 of the file's revision 52
# export:some/file -> Force the download of the file
- text = text.gsub(%r{([\s\(,-^])(!)?(attachment|document|version|commit|source|export)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*|"[^"]+"))(?=[[:punct:]]|\s|<|$)}) do |m|
+ text = text.gsub(%r{([\s\(,\-\>]|^)(!)?(attachment|document|version|commit|source|export)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*|"[^"]+"))(?=[[:punct:]]|\s|<|$)}) do |m|
leading, esc, prefix, sep, oid = $1, $2, $3, $5 || $7, $6 || $8
link = nil
if esc.nil?