summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-11-11 18:29:12 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-11-11 18:29:12 +0000
commit542a493352769b8efbcaefa91fcd57e7d683ae86 (patch)
treec97595e5ee965c2712c1e730e385967bd19455dc /lib/redmine/wiki_formatting
parenta5d263dba8c7022c4bd737228e43526f691836c6 (diff)
downloadredmine-542a493352769b8efbcaefa91fcd57e7d683ae86.tar.gz
redmine-542a493352769b8efbcaefa91fcd57e7d683ae86.zip
Simplify code (#40197).
git-svn-id: https://svn.redmine.org/redmine/trunk@23248 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting')
-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,