diff options
author | Sam Bigelow <sbigelow@gitlab.com> | 2018-12-14 12:56:25 -0500 |
---|---|---|
committer | Sam Bigelow <sbigelow@gitlab.com> | 2019-01-02 08:24:32 -0800 |
commit | 066a99b6e9d0849b477858c9aac274c2f81bb367 (patch) | |
tree | b98cd6b7ea66d64c4e7aa1dbb86055b48bed59cc /app/helpers/blob_helper.rb | |
parent | 28cffb9f41836a84d3323e640fe31f92f37bccd9 (diff) | |
download | gitlab-ce-066a99b6e9d0849b477858c9aac274c2f81bb367.tar.gz |
Add markdown buttons to file editor27861-add-markdown-editing-buttons-to-the-file-editor
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.rb | 3 |
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 |