diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-09-02 18:24:27 +0300 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-09-05 17:19:16 +0300 |
commit | a963721f797b451efec15702e73752c8b8830631 (patch) | |
tree | 46b920a9b5fd0078d5cfdcdecb8e5c16be852f21 /app/views/projects/wikis/_form.html.haml | |
parent | e41b99943230240403bdca7b19d5f379892cd819 (diff) |
render using RedCarpet if legacy_render parameter is set
Diffstat (limited to 'app/views/projects/wikis/_form.html.haml')
-rw-r--r-- | app/views/projects/wikis/_form.html.haml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml index 05791e9d4fc..707fc1dc842 100644 --- a/app/views/projects/wikis/_form.html.haml +++ b/app/views/projects/wikis/_form.html.haml @@ -1,8 +1,10 @@ - commit_message = @page.persisted? ? s_("WikiPageEdit|Update %{page_title}") : s_("WikiPageCreate|Create %{page_title}") - commit_message = commit_message % { page_title: @page.title } +- markdown_version = params[:legacy_render] ? CacheMarkdownField::CACHE_REDCARPET_VERSION : 0 = form_for [@project.namespace.becomes(Namespace), @project, @page], method: @page.persisted? ? :put : :post, - html: { class: 'wiki-form common-note-form prepend-top-default js-quick-submit' } do |f| + html: { class: 'wiki-form common-note-form prepend-top-default js-quick-submit' }, + data: { markdown_version: markdown_version } do |f| = form_errors(@page) - if @page.persisted? |