diff options
author | Robert Speicher <robert@gitlab.com> | 2016-01-26 02:43:44 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-01-26 03:01:37 +0300 |
commit | 65d85a4403f6e5899f793acb53c64d7ad5ba7fdd (patch) | |
tree | 309432cea736c9b48203d7a1c1688aeab5d49532 /app/views | |
parent | cb664e269ff29da7060fe6f09510465e58f8ac5b (diff) |
Merge branch 'note-highlighting' into 'master'
Highlight note code and edit preview
More highlighting fixes! Highlighting wasn't applied all the way for
code in notes, diff notes diffs and diff preview (on the file edit page).
The CSS changes further unify the styling for file-content highlighting,
diff highlighting and note code highlighting.
See merge request !2594
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/blob/_text.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/blob/preview.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/notes/discussions/_diff.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/snippets/_blob.html.haml | 3 |
4 files changed, 7 insertions, 8 deletions
diff --git a/app/views/projects/blob/_text.html.haml b/app/views/projects/blob/_text.html.haml index 4429c395aee..906e5ccb360 100644 --- a/app/views/projects/blob/_text.html.haml +++ b/app/views/projects/blob/_text.html.haml @@ -2,8 +2,8 @@ .file-content.wiki = render_markup(blob.name, blob.data) - else - .file-content.code - - unless blob.empty? - = render 'shared/file_highlight', blob: blob - - else + - unless blob.empty? + = render 'shared/file_highlight', blob: blob + - else + .file-content.code .nothing-here-block Empty file diff --git a/app/views/projects/blob/preview.html.haml b/app/views/projects/blob/preview.html.haml index c5a269f334c..541dc96c45f 100644 --- a/app/views/projects/blob/preview.html.haml +++ b/app/views/projects/blob/preview.html.haml @@ -8,7 +8,7 @@ .file-content.wiki = raw render_markup(@blob.name, @content) - else - .file-content.code + .file-content.code.js-syntax-highlight - unless @diff_lines.empty? %table.text-file - @diff_lines.each do |line| diff --git a/app/views/projects/notes/discussions/_diff.html.haml b/app/views/projects/notes/discussions/_diff.html.haml index 92bbaf0961a..820e31ccd61 100644 --- a/app/views/projects/notes/discussions/_diff.html.haml +++ b/app/views/projects/notes/discussions/_diff.html.haml @@ -9,7 +9,7 @@ = diff.new_path - if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}" - .diff-content + .diff-content.code.js-syntax-highlight %table - note.truncated_diff_lines.each do |line| - type = line.type diff --git a/app/views/shared/snippets/_blob.html.haml b/app/views/shared/snippets/_blob.html.haml index d26a99bb14c..e0e41fc4bea 100644 --- a/app/views/shared/snippets/_blob.html.haml +++ b/app/views/shared/snippets/_blob.html.haml @@ -3,8 +3,7 @@ .file-content.wiki = render_markup(@snippet.file_name, @snippet.data) - else - .file-content.code - = render 'shared/file_highlight', blob: @snippet + = render 'shared/file_highlight', blob: @snippet - else .file-content.code .nothing-here-block Empty file |