summaryrefslogtreecommitdiff
path: root/lib/gitlab/reference_extractor.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-14 09:46:06 +0200
committerDouwe Maan <douwe@gitlab.com>2015-10-14 09:46:06 +0200
commitd313a7681be1f307d8178eca13a2e73118f80930 (patch)
tree6a66ae4b2babd72c74cfb97077474cb012617a1e /lib/gitlab/reference_extractor.rb
parentd6fb96b9276d1a9edfae261d2eba2f79f8a9f340 (diff)
downloadgitlab-ce-d313a7681be1f307d8178eca13a2e73118f80930.tar.gz
Explicitly only parse references by specified filter
Diffstat (limited to 'lib/gitlab/reference_extractor.rb')
-rw-r--r--lib/gitlab/reference_extractor.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/reference_extractor.rb b/lib/gitlab/reference_extractor.rb
index 895a23ddcc8..66016ecc877 100644
--- a/lib/gitlab/reference_extractor.rb
+++ b/lib/gitlab/reference_extractor.rb
@@ -40,16 +40,20 @@ module Gitlab
#
# Returns the results Array for the requested filter type
def pipeline_result(filter_type)
- klass = filter_type.to_s.camelize + 'ReferenceFilter'
+ klass = "#{filter_type.to_s.camelize}ReferenceFilter"
filter = Gitlab::Markdown.const_get(klass)
context = {
project: project,
current_user: current_user,
+
# We don't actually care about the links generated
only_path: true,
ignore_blockquotes: true,
- load_lazy_references: false
+
+ # ReferenceGathererFilter
+ load_lazy_references: false,
+ reference_filter: filter
}
pipeline = HTML::Pipeline.new([filter, Gitlab::Markdown::ReferenceGathererFilter], context)