diff options
author | Kerri Miller <kerrizor@kerrizor.com> | 2019-06-03 14:52:58 -0700 |
---|---|---|
committer | Kerri Miller <kerrizor@kerrizor.com> | 2019-06-05 16:19:45 -0700 |
commit | fb3d40cb61eaff46bc10d3d49d499bd5d34a6be1 (patch) | |
tree | e809169c40e27143b19897ead3cdb3f1466b4009 /app/services | |
parent | f44eba8c0e537362ccf362480517f12ee7c73130 (diff) | |
download | gitlab-ce-fb3d40cb61eaff46bc10d3d49d499bd5d34a6be1.tar.gz |
Extend #parse to accept a suggestions_filter_enabled param
This will allow the front end to specify the behavior as needed.
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/preview_markdown_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/preview_markdown_service.rb b/app/services/preview_markdown_service.rb index 7386530f45f..2b4c4ae68e2 100644 --- a/app/services/preview_markdown_service.rb +++ b/app/services/preview_markdown_service.rb @@ -38,7 +38,9 @@ class PreviewMarkdownService < BaseService head_sha: params[:head_sha], start_sha: params[:start_sha]) - Gitlab::Diff::SuggestionsParser.parse(text, position: position, project: project) + Gitlab::Diff::SuggestionsParser.parse(text, position: position, + project: project, + supports_suggestion: params[:preview_suggestions]) end def preview_sugestions? |