summaryrefslogtreecommitdiff
path: root/lib/gitlab/markdown
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-01 12:49:22 +0100
committerDouwe Maan <douwe@gitlab.com>2015-12-01 12:49:22 +0100
commitbd4ab21c07061e06166b08d86157e4004665ccbc (patch)
tree1919104e423a1aca38a9a7cd1f2116990b1151c6 /lib/gitlab/markdown
parent4a0ebccf6b96184888f2d28b6e97592c6cb239c7 (diff)
downloadgitlab-ce-bd4ab21c07061e06166b08d86157e4004665ccbc.tar.gz
Fix code docs
Diffstat (limited to 'lib/gitlab/markdown')
-rw-r--r--lib/gitlab/markdown/abstract_reference_filter.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/gitlab/markdown/abstract_reference_filter.rb b/lib/gitlab/markdown/abstract_reference_filter.rb
index 4adc44361b7..02a9e05a699 100644
--- a/lib/gitlab/markdown/abstract_reference_filter.rb
+++ b/lib/gitlab/markdown/abstract_reference_filter.rb
@@ -2,8 +2,8 @@ require 'gitlab/markdown'
module Gitlab
module Markdown
- # Issues, Snippets and Merge Requests shares similar functionality in refernce filtering.
- # All this functionality moved to this class
+ # Issues, Snippets, Merge Requests, Commits and Commit Ranges share
+ # similar functionality in refernce filtering.
class AbstractReferenceFilter < ReferenceFilter
include CrossProjectReference
@@ -26,16 +26,15 @@ module Gitlab
# Public: Find references in text (like `!123` for merge requests)
#
- # AnyReferenceFilter.references_in(text) do |match, object|
- # "<a href=...>PREFIX#{object}</a>"
+ # AnyReferenceFilter.references_in(text) do |match, id, project_ref, matches|
+ # object = find_object(project_ref, id)
+ # "<a href=...>#{object.to_reference}</a>"
# end
#
- # PREFIX - symbol that detects reference (like ! for merge requests)
- # object - reference object (snippet, merget request etc)
# text - String text to search.
#
- # Yields the String match, the Integer referenced object ID, and an optional String
- # of the external project reference.
+ # Yields the String match, the Integer referenced object ID, an optional String
+ # of the external project reference, and all of the matchdata.
#
# Returns a String replaced with the return of the block.
def self.references_in(text)