diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-11 18:28:41 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-11 18:28:41 +0000 |
commit | a5d263dba8c7022c4bd737228e43526f691836c6 (patch) | |
tree | 518ad4708741df4f5f211ef33f9566219a71810c /lib/redmine/wiki_formatting/common_mark/formatter.rb | |
parent | 0abf7105dab7c6558a26cdcc28c6770ad89649d0 (diff) | |
download | redmine-a5d263dba8c7022c4bd737228e43526f691836c6.tar.gz redmine-a5d263dba8c7022c4bd737228e43526f691836c6.zip |
Updates commonmark gem version to 1.1.5 which switches from libcmark-gfm to comrak/Rust (#40197).
git-svn-id: https://svn.redmine.org/redmine/trunk@23247 e93f8b46-1217-0410-a6f0-8f06a7374b81
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 |