lib/gitlab/markdown/commit_range_reference_filter.rb
# Replace commit range references in text with links to compare the commit
# ranges.
#
# text - String text to replace references in.
#
# Returns a String with commit range references replaced with links. All
# links have `gfm` and `gfm-commit_range` class names attached for
# styling.
Replace commit range references in text with links to compare the commit
ranges.

String text to replace references in.

Returns a String with commit range references replaced with links. All
links have `gfm` and `gfm-commit_range` class names attached for
styling.
Replace commit range references in text with links to compare the commit ranges . String text to replace references in . Returns a String with commit range references replaced with links . All links have ` gfm ` and ` gfm - commit_range ` class names attached for styling .
def commit_range_link_filter(text)
        self.class.references_in(text) do |match, id, project_ref|
          project = self.project_from_ref(project_ref)
          range = CommitRange.new(id, project)
          if range.valid_commits?
            push_result(:commit_range, range)
            url = url_for_commit_range(project, range)
            title = range.reference_title
            klass = reference_class(:commit_range)
            project_ref += '@' if project_ref
            %(<a href="#{url}"
                 title="#{title}"
                 class="#{klass}">#{project_ref}#{range}</a>)
          else
            match
          end
        end
      end
def commit_range_link_filter ( text ) self . class . references_in ( text ) do | match , id , project_ref | project = self . project_from_ref ( project_ref ) range = CommitRange . new ( id , project ) if range . valid_commits? push_result ( :commit_range , range ) url = url_for_commit_range ( project , range ) title = range . reference_title klass = reference_class ( :commit_range ) project_ref += '@' if project_ref %(<a href="#{url}"
                 title="#{title}"
                 class="#{klass}">#{project_ref}#{range}</a>) else match end end end
Replace commit range references in text with links to compare the commit
ranges.
Replace commit range references in text with links to compare the commit ranges .
text
<not_specific>