summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-04-15 15:49:08 +0000
committerLin Jen-Shin <godfat@godfat.org>2019-04-15 15:49:08 +0000
commitfcb70d9bbbc14dc695fa87dc1dea5fa7fe78f6d2 (patch)
tree23aeb13b7291cf0e01018a3a432ec373d2f9def5 /lib
parent95bbcf082970ae72d3bac814101803e4118db47e (diff)
parent81da9337e17d288366d4257e1bbe4ba62cb1b21c (diff)
downloadgitlab-ce-fcb70d9bbbc14dc695fa87dc1dea5fa7fe78f6d2.tar.gz
Merge branch 'osw-remote-multi-line-suggestions-ff' into 'master'
Remove multi-line suggestions feature flag Closes #59178 See merge request gitlab-org/gitlab-ce!27219
Diffstat (limited to 'lib')
-rw-r--r--lib/banzai/filter/suggestion_filter.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/banzai/filter/suggestion_filter.rb b/lib/banzai/filter/suggestion_filter.rb
index 848aca10a20..3d40abfc540 100644
--- a/lib/banzai/filter/suggestion_filter.rb
+++ b/lib/banzai/filter/suggestion_filter.rb
@@ -6,15 +6,11 @@ module Banzai
class SuggestionFilter < HTML::Pipeline::Filter
# Class used for tagging elements that should be rendered
TAG_CLASS = 'js-render-suggestion'.freeze
- SUGGESTION_REGEX = Gitlab::Diff::SuggestionsParser::SUGGESTION_CONTEXT
def call
return doc unless suggestions_filter_enabled?
doc.search('pre.suggestion > code').each do |node|
- # TODO: Remove once multi-line suggestions FF get removed (#59178).
- remove_multi_line_params(node.parent)
-
node.add_class(TAG_CLASS)
end
@@ -30,14 +26,6 @@ module Banzai
def project
context[:project]
end
-
- def remove_multi_line_params(node)
- return if Feature.enabled?(:multi_line_suggestions, project)
-
- if node[SyntaxHighlightFilter::LANG_PARAMS_ATTR]&.match?(SUGGESTION_REGEX)
- node.remove_attribute(SyntaxHighlightFilter::LANG_PARAMS_ATTR)
- end
- end
end
end
end