summaryrefslogtreecommitdiff
path: root/app/helpers/blob_helper.rb
diff options
context:
space:
mode:
authorSam Bigelow <sbigelow@gitlab.com>2018-12-14 12:56:25 -0500
committerSam Bigelow <sbigelow@gitlab.com>2019-01-02 08:24:32 -0800
commit066a99b6e9d0849b477858c9aac274c2f81bb367 (patch)
treeb98cd6b7ea66d64c4e7aa1dbb86055b48bed59cc /app/helpers/blob_helper.rb
parent28cffb9f41836a84d3323e640fe31f92f37bccd9 (diff)
downloadgitlab-ce-066a99b6e9d0849b477858c9aac274c2f81bb367.tar.gz
Currently, we have markdown files in many places (e.g. comments, new issues, etc.). This Merge Request detects if the file being edited is a markdown file and adds markdown buttons and their functionality to the single file editor (Not the web IDE)
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r--app/helpers/blob_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index 3dea0975beb..23d6684a8e6 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -177,7 +177,8 @@ module BlobHelper
'relative-url-root' => Rails.application.config.relative_url_root,
'assets-prefix' => Gitlab::Application.config.assets.prefix,
'blob-filename' => @blob && @blob.path,
- 'project-id' => project.id
+ 'project-id' => project.id,
+ 'is-markdown' => @blob && @blob.path && Gitlab::MarkupHelper.gitlab_markdown?(@blob.path)
}
end