diff options
author | Phil Hughes <me@iamphill.com> | 2016-03-10 12:15:00 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-03-10 12:15:00 +0000 |
commit | a0c4f3dfa90bf3c7c51af2b5d7c0fcbce45d6280 (patch) | |
tree | 5a383fbbdb8cbfd3ddc13c25b0d27fe20bb74e47 | |
parent | 491ac7ce4b79c901e23799d2062f9f013f08c6c3 (diff) | |
download | gitlab-ce-a0c4f3dfa90bf3c7c51af2b5d7c0fcbce45d6280.tar.gz |
Fixes issue with markdown snippet not being copyable
On markdown snippets this adds a hidden div with the raw markdown content so that it can be copied
Closes #13882
-rw-r--r-- | app/views/shared/snippets/_blob.html.haml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/views/shared/snippets/_blob.html.haml b/app/views/shared/snippets/_blob.html.haml index e0e41fc4bea..c84614c0879 100644 --- a/app/views/shared/snippets/_blob.html.haml +++ b/app/views/shared/snippets/_blob.html.haml @@ -1,5 +1,7 @@ - unless @snippet.content.empty? - if markup?(@snippet.file_name) + .hidden.blob-content{data: {blob_id: @snippet.id}} + = @snippet.data .file-content.wiki = render_markup(@snippet.file_name, @snippet.data) - else |