diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-07-06 18:49:33 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-07-06 18:49:33 +0000 |
commit | 750af9fd32a050d1d2a8a7c5d014e5467de1e87a (patch) | |
tree | 51e5a6d23d6a34541de358c29cb552449c959ed3 /app/helpers/markup_helper.rb | |
parent | 9790fe58e590856e920877a935bfd22942787525 (diff) | |
download | gitlab-ce-750af9fd32a050d1d2a8a7c5d014e5467de1e87a.tar.gz |
Use proper markdown rendering for previews
Diffstat (limited to 'app/helpers/markup_helper.rb')
-rw-r--r-- | app/helpers/markup_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/markup_helper.rb b/app/helpers/markup_helper.rb index 39e7a7fd396..cbb971cf8b7 100644 --- a/app/helpers/markup_helper.rb +++ b/app/helpers/markup_helper.rb @@ -107,6 +107,7 @@ module MarkupHelper def markup(file_name, text, context = {}) context[:project] ||= @project + context[:markdown_engine] ||= :redcarpet html = context.delete(:rendered) || markup_unsafe(file_name, text, context) prepare_for_rendering(html, context) end @@ -120,7 +121,8 @@ module MarkupHelper project: @project, project_wiki: @project_wiki, page_slug: wiki_page.slug, - issuable_state_filter_enabled: true + issuable_state_filter_enabled: true, + markdown_engine: :redcarpet } html = |