Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-01-19 16:52:41 +0300
committerDouwe Maan <douwe@gitlab.com>2016-01-19 16:52:41 +0300
commit512bebe21d7f57b691a1c8355581feb64b9b6292 (patch)
tree22813185c803071668a235b9418e1476075e81df /app/helpers/blob_helper.rb
parent0a8039eb7790426880bdd7b9d67775aeb6e5dac7 (diff)
Refactor Gitlab::Highlight and fix tests
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r--app/helpers/blob_helper.rb8
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