mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-08 10:13:06 +00:00
Simplify code (#40197).
git-svn-id: https://svn.redmine.org/redmine/trunk@23248 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a5d263dba8
commit
542a493352
@ -40,15 +40,11 @@ module Redmine
|
|||||||
|
|
||||||
# https://github.com/gjtorikian/commonmarker#render-options
|
# https://github.com/gjtorikian/commonmarker#render-options
|
||||||
commonmarker_render_options: {
|
commonmarker_render_options: {
|
||||||
unsafe: true
|
unsafe: true,
|
||||||
},
|
hardbreaks: Redmine::Configuration['common_mark_enable_hardbreaks'] == true ? true : false,
|
||||||
|
}.freeze,
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
if Redmine::Configuration['common_mark_enable_hardbreaks'] == true
|
|
||||||
PIPELINE_CONFIG[:commonmarker_render_options].merge!({hardbreaks: true})
|
|
||||||
end
|
|
||||||
PIPELINE_CONFIG[:commonmarker_render_options].freeze
|
|
||||||
|
|
||||||
MarkdownPipeline = HTML::Pipeline.new [
|
MarkdownPipeline = HTML::Pipeline.new [
|
||||||
MarkdownFilter,
|
MarkdownFilter,
|
||||||
SanitizationFilter,
|
SanitizationFilter,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user