lib/gitlab/markdown/label_reference_filter.rb
# Replace label references in text with links to the label specified.
#
# text - String text to replace references in.
#
# Returns a String with label references replaced with links. All links
# have `gfm` and `gfm-label` class names attached for styling.
Replace label references in text with links to the label specified.
text - String text to replace references in.

Returns a String with label references replaced with links. All links
have `gfm` and `gfm-label` class names attached for styling.
Replace label references in text with links to the label specified . text - String text to replace references in . Returns a String with label references replaced with links . All links have ` gfm ` and ` gfm - label ` class names attached for styling .
def label_link_filter(text)
        project = context[:project]
        self.class.references_in(text) do |match, id, name|
          params = label_params(id, name)
          if label = project.labels.find_by(params)
            push_result(:label, label)
            url = url_for_label(project, label)
            klass = reference_class(:label)
            %(<a href="#{url}"
                 class="#{klass}">#{render_colored_label(label)}</a>)
          else
            match
          end
        end
      end
def label_link_filter ( text ) project = context [ :project ] self . class . references_in ( text ) do | match , id , name | params = label_params ( id , name ) if label = project . labels . find_by ( params ) push_result ( :label , label ) url = url_for_label ( project , label ) klass = reference_class ( :label ) %(<a href="#{url}"
                 class="#{klass}">#{render_colored_label(label)}</a>) else match end end end
Replace label references in text with links to the label specified.
Replace label references in text with links to the label specified .
text
<not_specific>