Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/presenters')
-rw-r--r--app/presenters/snippet_blob_presenter.rb12
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