]> source.dussan.org Git - redmine.git/commitdiff
Disable syntax_highlighter plugin shipped by commonmark (#40197).
authorMarius Balteanu <marius.balteanu@zitec.com>
Sun, 3 Nov 2024 12:05:27 +0000 (12:05 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Sun, 3 Nov 2024 12:05:27 +0000 (12:05 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@23190 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/wiki_formatting/common_mark/formatter.rb
lib/redmine/wiki_formatting/common_mark/markdown_filter.rb

index 1a705bd73bb953c9f0b8024ee98bbd33e1faa19b..2eee19fa3845004e59531bf74051d647a42b39cc 100644 (file)
@@ -43,6 +43,9 @@ module Redmine
           unsafe: true,
           hardbreaks: Redmine::Configuration['common_mark_enable_hardbreaks'] == true ? true : false,
         }.freeze,
+        commonmarker_plugins: {
+          syntax_highlighter: nil
+        }.freeze,
       }.freeze
 
       MarkdownPipeline = HTML::Pipeline.new [
index abde254434912b7c81f6896ea1417025e16275aa..0b7f52ea3b5cba92b63b3969d9dcea7af0527aba 100644 (file)
@@ -36,7 +36,7 @@ module Redmine
             extension: extensions,
             render: render_options,
             parse: parse_options
-          })
+          }, plugins: plugins )
 
           html.rstrip!
           html
@@ -55,6 +55,10 @@ module Redmine
         def render_options
           context.fetch :commonmarker_render_options, {}
         end
+
+        def plugins
+          context.fetch :commonmarker_plugins, {}
+        end
       end
     end
   end