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 ...@@ -15,7 +15,7 @@ class BlobPresenter < Gitlab::View::Presenter::Delegated
Gitlab::Highlight.highlight( Gitlab::Highlight.highlight(
blob.path, blob.path,
blob_data, blob_data(to),
language: blob_language, language: blob_language,
plain: plain plain: plain
) )
...@@ -27,7 +27,7 @@ class BlobPresenter < Gitlab::View::Presenter::Delegated ...@@ -27,7 +27,7 @@ class BlobPresenter < Gitlab::View::Presenter::Delegated
highlight(plain: false) highlight(plain: false)
end end
def blob_data def blob_data(to)
@_blob_data ||= Gitlab::Diff::CustomDiff.transformed_blob_data(blob) || limited_blob_data(to: to) @_blob_data ||= Gitlab::Diff::CustomDiff.transformed_blob_data(blob) || limited_blob_data(to: to)
end end
......
...@@ -48,7 +48,7 @@ module Gitlab ...@@ -48,7 +48,7 @@ module Gitlab
end end
def use_custom_diff? 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 end
def position(position_marker, position_type: :text) 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