diff options
Diffstat (limited to 'lib/redmine/wiki_formatting/common_mark/formatter.rb')
-rw-r--r-- | lib/redmine/wiki_formatting/common_mark/formatter.rb | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/lib/redmine/wiki_formatting/common_mark/formatter.rb b/lib/redmine/wiki_formatting/common_mark/formatter.rb index 42cae4f3a..4a0a7ec53 100644 --- a/lib/redmine/wiki_formatting/common_mark/formatter.rb +++ b/lib/redmine/wiki_formatting/common_mark/formatter.rb @@ -26,29 +26,26 @@ module Redmine # configuration of the rendering pipeline PIPELINE_CONFIG = { # https://github.com/gjtorikian/commonmarker#extension-options - commonmarker_extensions: [ - :table, - :strikethrough, - :tagfilter, - :autolink - ].freeze, + commonmarker_extensions: { + table: true, + strikethrough: true, + tagfilter: true, + autolink: true, + footnotes: true, + }.freeze, # https://github.com/gjtorikian/commonmarker#parse-options - commonmarker_parse_options: [ - :FOOTNOTES, - :STRIKETHROUGH_DOUBLE_TILDE, - :UNSAFE, - :VALIDATE_UTF8 - ].freeze, + commonmarker_parse_options: { + }.freeze, # https://github.com/gjtorikian/commonmarker#render-options - commonmarker_render_options: [ - :UNSAFE - ], + commonmarker_render_options: { + unsafe: true + }, }.freeze if Redmine::Configuration['common_mark_enable_hardbreaks'] == true - PIPELINE_CONFIG[:commonmarker_render_options].push(:HARDBREAKS) + PIPELINE_CONFIG[:commonmarker_render_options].merge!({hardbreaks: true}) end PIPELINE_CONFIG[:commonmarker_render_options].freeze |