document_projectlinks_in_parse_redmine_links-r4249.diff

Patch against trunk at r4249 - Mischa The Evil, 2010-10-18 06:34

Download (849 Bytes)

View differences:

app/helpers/application_helper.rb (working copy)
604 604
  #     export:some/file -> Force the download of the file
605 605
  #  Forum messages:
606 606
  #     message#1218 -> Link to message with id 1218
607
  #  Projects:
608
  #     project:someproject -> Link to project named "someproject"
609
  #     project#3 -> Link to project with id 3
607 610
  def parse_redmine_links(text, project, obj, attr, only_path, options)
608 611
    text.gsub!(%r{([\s\(,\-\[\>]|^)(!)?(attachment|document|version|commit|source|export|message|project)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]]\W)|,|\s|\]|<|$)}) do |m|
609 612
      leading, esc, prefix, sep, identifier = $1, $2, $3, $5 || $7, $6 || $8