From 542a493352769b8efbcaefa91fcd57e7d683ae86 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Mon, 11 Nov 2024 18:29:12 +0000 Subject: [PATCH] Simplify code (#40197). git-svn-id: https://svn.redmine.org/redmine/trunk@23248 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting/common_mark/formatter.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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, -- 2.39.5