Skip to content
Snippets Groups Projects
Commit 11db1f41 authored by Mark Chao's avatar Mark Chao
Browse files

Centralize loading blob data before highlighting

parent 896f2af2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -4,6 +4,8 @@ class BlobPresenter < Gitlab::View::Presenter::Simple
presents :blob
 
def highlight(plain: nil)
blob.load_all_data! if blob.respond_to?(:load_all_data!)
Gitlab::Highlight.highlight(
blob.path,
blob.data,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment