diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-06-07 10:13:07 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-06-07 10:13:07 +0000 |
commit | 96e2ff69acb31028865b4582758bf1dab51c4332 (patch) | |
tree | bf939c8879ff4ae442e911ecbcb67819fd8a822e /lib | |
parent | 4b086b74509500998bdc28a82871aa2c9003a194 (diff) | |
parent | 9994a5c12d6d68ffbfbd70fe210b53422dd78f4a (diff) | |
download | gitlab-ce-96e2ff69acb31028865b4582758bf1dab51c4332.tar.gz |
Merge branch '58297-remove-extraneous-gitaly-calls-from-md-rendering' into 'master'
Remove extraneous DiffNote#supports_suggestion? calls
See merge request gitlab-org/gitlab-ce!29027
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/diff/suggestions_parser.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/diff/suggestions_parser.rb b/lib/gitlab/diff/suggestions_parser.rb index c8c03d5d001..6e17ffaf6ff 100644 --- a/lib/gitlab/diff/suggestions_parser.rb +++ b/lib/gitlab/diff/suggestions_parser.rb @@ -10,10 +10,12 @@ module Gitlab # Returns an array of Gitlab::Diff::Suggestion which represents each # suggestion in the given text. # - def parse(text, position:, project:) + def parse(text, position:, project:, supports_suggestion: true) return [] unless position.complete? - html = Banzai.render(text, project: nil, no_original_data: true) + html = Banzai.render(text, project: nil, + no_original_data: true, + suggestions_filter_enabled: supports_suggestion) doc = Nokogiri::HTML(html) suggestion_nodes = doc.search('pre.suggestion') |