diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/blame/show.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/blob/_text.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/wikis/history.html.haml | 2 | ||||
-rw-r--r-- | app/views/search/results/_blob.html.haml | 2 | ||||
-rw-r--r-- | app/views/search/results/_wiki_blob.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/_file_highlight.html.haml (renamed from app/views/shared/_file_hljs.html.haml) | 7 | ||||
-rw-r--r-- | app/views/shared/snippets/_blob.html.haml | 2 |
7 files changed, 10 insertions, 13 deletions
diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index bdf02c6285d..c507ecf2e49 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -26,9 +26,9 @@ = i \ %td.lines - %pre - %code{ class: highlightjs_class(@blob.name) } + %pre{class: 'code highlight white'} + %code :erb <% lines.each do |line| %> - <%= line %> + <%= highlight(@blob.name, line, true).html_safe %> <% end %> diff --git a/app/views/projects/blob/_text.html.haml b/app/views/projects/blob/_text.html.haml index 7cbea7c3eb6..f6bd62f239b 100644 --- a/app/views/projects/blob/_text.html.haml +++ b/app/views/projects/blob/_text.html.haml @@ -8,6 +8,6 @@ - else .file-content.code - unless blob.empty? - = render 'shared/file_hljs', blob: blob + = render 'shared/file_highlight', blob: blob - else .nothing-here-block Empty file diff --git a/app/views/projects/wikis/history.html.haml b/app/views/projects/wikis/history.html.haml index b30eff94f2c..9c9a9933dcf 100644 --- a/app/views/projects/wikis/history.html.haml +++ b/app/views/projects/wikis/history.html.haml @@ -24,7 +24,7 @@ %td = commit.message %td - #{time_ago_with_tooltip(version.date)} + #{time_ago_with_tooltip(version.authored_date)} %td %strong = @page.page.wiki.page(@page.page.name, commit.id).try(:format) diff --git a/app/views/search/results/_blob.html.haml b/app/views/search/results/_blob.html.haml index b46b4832e19..dae641dab4f 100644 --- a/app/views/search/results/_blob.html.haml +++ b/app/views/search/results/_blob.html.haml @@ -6,4 +6,4 @@ %strong = blob.filename .file-content.code.term - = render 'shared/file_hljs', blob: blob, first_line_number: blob.startline + = render 'shared/file_highlight', blob: blob, first_line_number: blob.startline, user_color_scheme_class: 'white' diff --git a/app/views/search/results/_wiki_blob.html.haml b/app/views/search/results/_wiki_blob.html.haml index e361074b6a0..c7bc596eb14 100644 --- a/app/views/search/results/_wiki_blob.html.haml +++ b/app/views/search/results/_wiki_blob.html.haml @@ -6,4 +6,4 @@ %strong = wiki_blob.filename .file-content.code.term - = render 'shared/file_hljs', blob: wiki_blob, first_line_number: wiki_blob.startline + = render 'shared/file_highlight', blob: wiki_blob, first_line_number: wiki_blob.startline, user_color_scheme_class: 'white' diff --git a/app/views/shared/_file_hljs.html.haml b/app/views/shared/_file_highlight.html.haml index 444c948b026..52b48ff7451 100644 --- a/app/views/shared/_file_hljs.html.haml +++ b/app/views/shared/_file_highlight.html.haml @@ -1,4 +1,4 @@ -%div.highlighted-data{class: user_color_scheme_class} +.file-content.code{class: user_color_scheme_class} .line-numbers - if blob.data.present? - blob.data.lines.to_a.size.times do |index| @@ -7,7 +7,4 @@ = link_to "#L#{i}", id: "L#{i}", rel: "#L#{i}" do %i.fa.fa-link = i - .highlight - %pre - %code{ class: highlightjs_class(blob.name) } - #{blob.data} + = highlight(blob.name, blob.data) diff --git a/app/views/shared/snippets/_blob.html.haml b/app/views/shared/snippets/_blob.html.haml index 8cec6168ab8..30458793fd1 100644 --- a/app/views/shared/snippets/_blob.html.haml +++ b/app/views/shared/snippets/_blob.html.haml @@ -8,7 +8,7 @@ = render_markup(@snippet.file_name, @snippet.data) - else .file-content.code - = render 'shared/file_hljs', blob: @snippet + = render 'shared/file_highlight', blob: @snippet - else .file-content.code .nothing-here-block Empty file |