gitlab-org--gitlab-foss/app/views/projects/blame/show.html.haml
Stefan Tatschner bf079c24af Replace highlight.js with rouge-fork rugments
I decided to create a fork of rouge as rouge lacks a HTML formatter with
the required options such as wrapping a line with <span> tags.
Furthermore I was not really convinced about the clarity of rouge's
source code.

Rugments 1.0.0beta3 for now only includes some basic linting and a new
HTML formatter. Everything else should behave the same.
2015-01-15 13:41:11 +01:00

34 lines
1.2 KiB
Text

%h3.page-title Blame view
#tree-holder.tree-holder
.file-holder
.file-title
%i.fa.fa-file
%span.file_name
= @path
%small= number_to_human_size @blob.size
%span.options= render "projects/blob/actions"
.file-content.blame.highlight
%table
- @blame.each do |commit, lines, since|
- commit = Commit.new(commit)
%tr
%td.blame-commit
%span.commit
= link_to commit.short_id, project_commit_path(@project, commit), class: "commit_short_id"
&nbsp;
= commit_author_link(commit, avatar: true, size: 16)
&nbsp;
= link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title"
%td.lines.blame-numbers
%pre
- (since...(since + lines.count)).each do |i|
= i
\
%td.lines
%pre{class: 'code highlight white'}
%code
:erb
<% lines.each do |line| %>
<%= highlight(@blob.name, line, true).html_safe %>
<% end %>