summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/redmine/wiki_formatting/common_mark/formatter.rb10
1 files 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,