diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 18:08:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 18:08:58 +0000 |
commit | 1ca9950d5f890cd8f185e1eda158b969a7244fe2 (patch) | |
tree | 6f62715938a4b2b001705c51c697609a8e0850ae /app/presenters | |
parent | bcc77054ee9aefd1e332e04a4189390fd5a3112e (diff) | |
download | gitlab-ce-1ca9950d5f890cd8f185e1eda158b969a7244fe2.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/snippet_blob_presenter.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/presenters/snippet_blob_presenter.rb b/app/presenters/snippet_blob_presenter.rb index 9baaacdbb24..71361b18f5a 100644 --- a/app/presenters/snippet_blob_presenter.rb +++ b/app/presenters/snippet_blob_presenter.rb @@ -4,11 +4,13 @@ class SnippetBlobPresenter < BlobPresenter def highlighted_data return if blob.binary? - if blob.rich_viewer&.partial_name == 'markup' - blob.rendered_markup - else - highlight - end + highlight(plain: false) + end + + def plain_highlighted_data + return if blob.binary? + + highlight(plain: true) end def raw_path |