summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting/common_mark
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-11-03 12:03:32 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-11-03 12:03:32 +0000
commitc630acfa6f46658e833f9ebfae7d91bdfb09bf96 (patch)
treecd09ee85dbf87173a4a7df4425ec34279cbc1337 /lib/redmine/wiki_formatting/common_mark
parentda87320ebc2a62183a7c0e161add813c7a83777c (diff)
downloadredmine-c630acfa6f46658e833f9ebfae7d91bdfb09bf96.tar.gz
redmine-c630acfa6f46658e833f9ebfae7d91bdfb09bf96.zip
Simplify code (#40197).
git-svn-id: https://svn.redmine.org/redmine/trunk@23189 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting/common_mark')
-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,