Simplify code (#40197).

git-svn-id: https://svn.redmine.org/redmine/trunk@23248 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2024-11-11 18:29:12 +00:00
parent a5d263dba8
commit 542a493352

View File

@@ -40,15 +40,11 @@ module Redmine
# https://github.com/gjtorikian/commonmarker#render-options
commonmarker_render_options: {
unsafe: true
},
unsafe: true,
hardbreaks: Redmine::Configuration['common_mark_enable_hardbreaks'] == true ? true : false,
}.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 [
MarkdownFilter,
SanitizationFilter,