Commit e653f4c8 authored by Eduardo Bonet's avatar Eduardo Bonet

Adding parameter to blob_data

parent 283f0309
......@@ -15,7 +15,7 @@ class BlobPresenter < Gitlab::View::Presenter::Delegated
Gitlab::Highlight.highlight(
blob.path,
blob_data,
blob_data(to),
language: blob_language,
plain: plain
)
......@@ -27,7 +27,7 @@ class BlobPresenter < Gitlab::View::Presenter::Delegated
highlight(plain: false)
end
def blob_data
def blob_data(to)
@_blob_data ||= Gitlab::Diff::CustomDiff.transformed_blob_data(blob) || limited_blob_data(to: to)
end
......
......@@ -48,7 +48,7 @@ module Gitlab
end
def use_custom_diff?
strong_memoize(:_custom_diff_enabled) { Feature.enabled?(:jupyter_clean_diffs, repository.project, default_enabled: true) }
strong_memoize(:_custom_diff_enabled) { Feature.enabled?(:jupyter_clean_diffs, repository.project, default_enabled: true) }
end
def position(position_marker, position_type: :text)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment