summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-10 13:36:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-10 13:36:28 +0000
commitd7eb689c745493b79f8debace522224012a88480 (patch)
tree90037e2ec95c24b3aa9b2e95ec5f33a7faffbf49 /app/helpers
parentbe4cc2f99e34316be4b8beb2e9040c5ea967a736 (diff)
downloadredmine-d7eb689c745493b79f8debace522224012a88480.tar.gz
redmine-d7eb689c745493b79f8debace522224012a88480.zip
Fixed: trailing period should not be included in redmine links of type class:id (#1612).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1650 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-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 6266dd951..ad4c46440 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:]]\W)|\s|<|$)}) do |m|
leading, esc, prefix, sep, oid = $1, $2, $3, $5 || $7, $6 || $8
link = nil
if esc.nil?