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/views/projects/blame
parent0a8039eb7790426880bdd7b9d67775aeb6e5dac7 (diff)
Refactor Gitlab::Highlight and fix tests
Diffstat (limited to 'app/views/projects/blame')
-rw-r--r--app/views/projects/blame/show.html.haml5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml
index 8d9ec068a43..d5d04954490 100644
--- a/app/views/projects/blame/show.html.haml
+++ b/app/views/projects/blame/show.html.haml
@@ -15,6 +15,7 @@
.file-content.blame.highlight
%table
- current_line = 1
+ - blame_highlighter = highlighter(@blob.name, @blob.data, nowrap: true)
- @blame.each do |blame_group|
%tr
%td.blame-commit
@@ -41,5 +42,5 @@
%pre{class: 'code highlight white'}
%code
- blame_group[:lines].each do |line|
- :erb
- <%= highlight(@blob.name, line, nowrap: true, continue: true).html_safe %>
+ :preserve
+ #{blame_highlighter.highlight(line)}