Patch #40197 » 0002-Simplify-code.patch
lib/redmine/wiki_formatting/common_mark/formatter.rb | ||
---|---|---|
40 | 40 | |
41 | 41 |
# https://github.com/gjtorikian/commonmarker#render-options |
42 | 42 |
commonmarker_render_options: { |
43 |
unsafe: true |
|
44 |
}, |
|
43 |
unsafe: true, |
|
44 |
hardbreaks: Redmine::Configuration['common_mark_enable_hardbreaks'] == true ? true : false, |
|
45 |
}.freeze, |
|
45 | 46 |
}.freeze |
46 | 47 | |
47 |
if Redmine::Configuration['common_mark_enable_hardbreaks'] == true |
|
48 |
PIPELINE_CONFIG[:commonmarker_render_options].merge!({hardbreaks: true}) |
|
49 |
end |
|
50 |
PIPELINE_CONFIG[:commonmarker_render_options].freeze |
|
51 | ||
52 | 48 |
MarkdownPipeline = HTML::Pipeline.new [ |
53 | 49 |
MarkdownFilter, |
54 | 50 |
SanitizationFilter, |