From: Marius Balteanu Date: Mon, 11 Nov 2024 18:29:12 +0000 (+0000) Subject: Simplify code (#40197). X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=542a493352769b8efbcaefa91fcd57e7d683ae86;p=redmine.git Simplify code (#40197). git-svn-id: https://svn.redmine.org/redmine/trunk@23248 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/wiki_formatting/common_mark/formatter.rb b/lib/redmine/wiki_formatting/common_mark/formatter.rb index 4a0a7ec53..1a705bd73 100644 --- a/lib/redmine/wiki_formatting/common_mark/formatter.rb +++ b/lib/redmine/wiki_formatting/common_mark/formatter.rb @@ -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,