diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-09-04 14:21:20 -0500 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-09-05 09:19:16 -0500 |
commit | c4f26d4b1c9adcbfc3ad45b71534b990e2b6692b (patch) | |
tree | 4cfbc11da4275bd6a24dc65594b6998ffd076d32 /app/models/repository.rb | |
parent | 3aea946e7f590319ff7b85dbbd4eedfc20569deb (diff) | |
download | gitlab-ce-c4f26d4b1c9adcbfc3ad45b71534b990e2b6692b.tar.gz |
added feature flag 'commonmark_for_repositories'
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 4b4d5d5f349..929d28b9d88 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -580,7 +580,12 @@ class Repository end def rendered_readme - MarkupHelper.markup_unsafe(readme.name, readme.data, project: project) if readme + return unless readme + + context = { project: project } + context[:markdown_engine] = :redcarpet unless MarkupHelper.commonmark_for_repositories_enabled? + + MarkupHelper.markup_unsafe(readme.name, readme.data, context) end cache_method :rendered_readme |