summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-11-11 18:29:46 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-11-11 18:29:46 +0000
commitc0bb5002420a06dea511a4bd3c7c8ff09657300e (patch)
treee44d1726a63fd4bea13e46f6aab91b4415e25057 /lib
parent542a493352769b8efbcaefa91fcd57e7d683ae86 (diff)
downloadredmine-c0bb5002420a06dea511a4bd3c7c8ff09657300e.tar.gz
redmine-c0bb5002420a06dea511a4bd3c7c8ff09657300e.zip
Disables @syntax_highlighter@ plugin shipped by commonmark (#40197).
git-svn-id: https://svn.redmine.org/redmine/trunk@23249 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/wiki_formatting/common_mark/formatter.rb3
-rw-r--r--lib/redmine/wiki_formatting/common_mark/markdown_filter.rb6
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/common_mark/formatter.rb b/lib/redmine/wiki_formatting/common_mark/formatter.rb
index 1a705bd73..2eee19fa3 100644
--- a/lib/redmine/wiki_formatting/common_mark/formatter.rb
+++ b/lib/redmine/wiki_formatting/common_mark/formatter.rb
@@ -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 [
diff --git a/lib/redmine/wiki_formatting/common_mark/markdown_filter.rb b/lib/redmine/wiki_formatting/common_mark/markdown_filter.rb
index abde25443..0b7f52ea3 100644
--- a/lib/redmine/wiki_formatting/common_mark/markdown_filter.rb
+++ b/lib/redmine/wiki_formatting/common_mark/markdown_filter.rb
@@ -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