Commit bf93f3de authored by Mark Chao's avatar Mark Chao

Centralize loading blob data before highlighting

parent 44a35c2a
......@@ -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,
......
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