summaryrefslogtreecommitdiff
path: root/app/helpers/blob_helper.rb
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2016-06-10 15:42:43 -0700
committerhttp://jneen.net/ <jneen@jneen.net>2016-06-27 14:17:49 -0700
commitf8b80f7faedef7515d05abd9a5cc315d98724ae3 (patch)
tree9f0079320c6edbf2ded9221960d2f71e1aca5053 /app/helpers/blob_helper.rb
parent0fd4b9d3e2c800e728e17e919fa7369b3322c65b (diff)
downloadgitlab-ce-f8b80f7faedef7515d05abd9a5cc315d98724ae3.tar.gz
add custom highlighting via .gitattributes
paired with @stanhu
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r--app/helpers/blob_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index 4b4bc3d4276..428a42266d0 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -1,10 +1,10 @@
module BlobHelper
- def highlighter(blob_name, blob_content, nowrap: false)
- Gitlab::Highlight.new(blob_name, blob_content, nowrap: nowrap)
+ def highlighter(blob_name, blob_content, repository: nil, nowrap: false)
+ Gitlab::Highlight.new(blob_name, blob_content, nowrap: nowrap, repository: repository)
end
- def highlight(blob_name, blob_content, nowrap: false, plain: false)
- Gitlab::Highlight.highlight(blob_name, blob_content, nowrap: nowrap, plain: plain)
+ def highlight(blob_name, blob_content, repository: nil, nowrap: false, plain: false)
+ Gitlab::Highlight.highlight(blob_name, blob_content, nowrap: nowrap, plain: plain, repository: repository)
end
def no_highlight_files