diff options
Diffstat (limited to 'lib/redmine/wiki_formatting/common_mark/formatter.rb')
-rw-r--r-- | lib/redmine/wiki_formatting/common_mark/formatter.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/redmine/wiki_formatting/common_mark/formatter.rb b/lib/redmine/wiki_formatting/common_mark/formatter.rb index 6a9c95c8e..3c2f3ad09 100644 --- a/lib/redmine/wiki_formatting/common_mark/formatter.rb +++ b/lib/redmine/wiki_formatting/common_mark/formatter.rb @@ -42,11 +42,15 @@ module Redmine # https://github.com/gjtorikian/commonmarker#render-options commonmarker_render_options: [ - :HARDBREAKS, :UNSAFE - ].freeze, + ], }.freeze + if Redmine::Configuration['common_mark_enable_hardbreaks'] === true + PIPELINE_CONFIG[:commonmarker_render_options].push(:HARDBREAKS) + end + PIPELINE_CONFIG[:commonmarker_render_options].freeze + MarkdownPipeline = HTML::Pipeline.new [ MarkdownFilter, SanitizationFilter, |