lib/gitlab/markdown/label_reference_filter.rb
# Public: Find label references in text
#
#   LabelReferenceFilter.references_in(text) do |match, id, name|
#     "<a href=...>#{Label.find(id)}</a>"
#   end
#
# text - String text to search.
#
# Yields the String match, an optional Integer label ID, and an optional
# String label name.
#
# Returns a String replaced with the return of the block.


String text to search.

Yields the String match, an optional Integer label ID, and an optional
String label name.

Returns a String replaced with the return of the block.
String text to search . Yields the String match an optional Integer label ID and an optional String label name . Returns a String replaced with the return of the block .
def call
        replace_text_nodes_matching(Label.reference_pattern) do |content|
          label_link_filter(content)
        end
      end
def call replace_text_nodes_matching ( Label . reference_pattern ) do | content | label_link_filter ( content ) end end
Public: Find label references in text
LabelReferenceFilter.references_in(text) do |match, id, name|
"<a href=...>#{Label.find(id)}</a>"
end
Public : Find label references in text LabelReferenceFilter . references_in ( text ) do |match id name| " <a href = ... > # { Label . find ( id ) } < / a > " end