Accept issue links inside brackets (#4418).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3598 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
194dab8e96
commit
0e0b8e0799
|
@ -541,7 +541,7 @@ module ApplicationHelper
|
||||||
# Forum messages:
|
# Forum messages:
|
||||||
# message#1218 -> Link to message with id 1218
|
# message#1218 -> Link to message with id 1218
|
||||||
def parse_redmine_links(text, project, obj, attr, only_path, options)
|
def parse_redmine_links(text, project, obj, attr, only_path, options)
|
||||||
text.gsub!(%r{([\s\(,\-\>]|^)(!)?(attachment|document|version|commit|source|export|message|project)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]]\W)|,|\s|<|$)}) do |m|
|
text.gsub!(%r{([\s\(,\-\[\>]|^)(!)?(attachment|document|version|commit|source|export|message|project)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]]\W)|,|\s|\]|<|$)}) do |m|
|
||||||
leading, esc, prefix, sep, identifier = $1, $2, $3, $5 || $7, $6 || $8
|
leading, esc, prefix, sep, identifier = $1, $2, $3, $5 || $7, $6 || $8
|
||||||
link = nil
|
link = nil
|
||||||
if esc.nil?
|
if esc.nil?
|
||||||
|
|
|
@ -158,7 +158,7 @@ RAW
|
||||||
|
|
||||||
to_test = {
|
to_test = {
|
||||||
# tickets
|
# tickets
|
||||||
'#3, #3 and #3.' => "#{issue_link}, #{issue_link} and #{issue_link}.",
|
'#3, [#3], (#3) and #3.' => "#{issue_link}, [#{issue_link}], (#{issue_link}) and #{issue_link}.",
|
||||||
# changesets
|
# changesets
|
||||||
'r1' => changeset_link,
|
'r1' => changeset_link,
|
||||||
'r1.' => "#{changeset_link}.",
|
'r1.' => "#{changeset_link}.",
|
||||||
|
|
Loading…
Reference in New Issue