diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-01-19 14:52:41 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-01-19 14:52:41 +0100 |
commit | 512bebe21d7f57b691a1c8355581feb64b9b6292 (patch) | |
tree | 22813185c803071668a235b9418e1476075e81df /app/helpers/blob_helper.rb | |
parent | 0a8039eb7790426880bdd7b9d67775aeb6e5dac7 (diff) | |
download | gitlab-ce-512bebe21d7f57b691a1c8355581feb64b9b6292.tar.gz |
Refactor Gitlab::Highlight and fix tests
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r-- | app/helpers/blob_helper.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index be856242c43..7c55934edda 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -1,6 +1,10 @@ module BlobHelper - def highlight(blob_name, blob_content, nowrap: false, continue: false) - Gitlab::Highlight.highlight(blob_name, blob_content, nowrap: nowrap, continue: continue) + def highlighter(blob_name, blob_content, nowrap: false) + Gitlab::Highlight.new(blob_name, blob_content, nowrap: nowrap) + end + + def highlight(blob_name, blob_content, nowrap: false) + Gitlab::Highlight.highlight(blob_name, blob_content, nowrap: nowrap) end def no_highlight_files |