Patch #6689 ยป document_projectlinks_in_parse_redmine_links-r4249.diff
| app/helpers/application_helper.rb (working copy) | ||
|---|---|---|
|
# export:some/file -> Force the download of the file
|
||
|
# Forum messages:
|
||
|
# message#1218 -> Link to message with id 1218
|
||
|
# Projects:
|
||
|
# project:someproject -> Link to project named "someproject"
|
||
|
# project#3 -> Link to project with id 3
|
||
|
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|
|
||
|
leading, esc, prefix, sep, identifier = $1, $2, $3, $5 || $7, $6 || $8
|
||