summaryrefslogtreecommitdiff
path: root/app/views/projects/blob/viewers
diff options
context:
space:
mode:
authorhaseeb <haseebeqx@yahoo.com>2018-02-06 19:03:18 +0530
committerhaseeb <haseebeqx@yahoo.com>2018-02-28 18:48:26 +0530
commit27e8d38cea92d165a2e8400b25df23f408b4dca0 (patch)
tree0a16f63c8f380c92fb4185ca21ba8a264c572641 /app/views/projects/blob/viewers
parent56af0631c6c6d838301ac068f2e79b8f4de9fda7 (diff)
downloadgitlab-ce-27e8d38cea92d165a2e8400b25df23f408b4dca0.tar.gz
embedded snippets support
Diffstat (limited to 'app/views/projects/blob/viewers')
-rw-r--r--app/views/projects/blob/viewers/_highlight_embed.html.haml7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/views/projects/blob/viewers/_highlight_embed.html.haml b/app/views/projects/blob/viewers/_highlight_embed.html.haml
new file mode 100644
index 00000000000..9bd4ef6ad0b
--- /dev/null
+++ b/app/views/projects/blob/viewers/_highlight_embed.html.haml
@@ -0,0 +1,7 @@
+.file-content.code.js-syntax-highlight
+ .line-numbers
+ - if blob.data.present?
+ - blob.data.each_line.each_with_index do |_, index|
+ %span.diff-line-num= index + 1
+ .blob-content{ data: { blob_id: blob.id } }
+ = highlight(blob.path, blob.data, repository: nil, plain: blob.no_highlighting?)