wiki_anchors.diff

Holger Just, 2014-03-11 13:38

Download (728 Bytes)

View differences:

app/helpers/application_helper.rb
670 670
      link_project = project
671 671
      esc, all, page, title = $1, $2, $3, $5
672 672
      if esc.nil?
673
        if page =~ /^\#(.+)$/
674
          anchor = sanitize_anchor_name($1)
675
          url = "##{anchor}"
676
          next link_to(title.present? ? title.html_safe : h(page), url, :class => 'wiki-page')
677
        end
678

  
673 679
        if page =~ /^([^\:]+)\:(.*)$/
674 680
          identifier, page = $1, $2
675 681
          link_project = Project.find_by_identifier(identifier) || Project.find_by_name(identifier)