diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-04-10 10:49:25 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-04-10 10:52:37 -0300 |
commit | 81da9337e17d288366d4257e1bbe4ba62cb1b21c (patch) | |
tree | e9ec9624a6a27454c219404b87ead31365cba68f /lib | |
parent | 6c8a13da33e5ff11210122f7863d36f989b99630 (diff) | |
download | gitlab-ce-81da9337e17d288366d4257e1bbe4ba62cb1b21c.tar.gz |
Remove multi-line suggestions feature flagosw-remote-multi-line-suggestions-ff
That's a straightforward feature flag code removal for 11.10
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/suggestion_filter.rb | 12 |
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 |