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/views/projects/blame | |
parent | 0a8039eb7790426880bdd7b9d67775aeb6e5dac7 (diff) | |
download | gitlab-ce-512bebe21d7f57b691a1c8355581feb64b9b6292.tar.gz |
Refactor Gitlab::Highlight and fix tests
Diffstat (limited to 'app/views/projects/blame')
-rw-r--r-- | app/views/projects/blame/show.html.haml | 5 |
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)} |