Make commonmarker gem required to avoid runtime error (#37394).

Although the commonmarker gem is marked as optional in the Gemfile, Redmine fails to start without it, raising a NameError: "uninitialized constant Redmine::WikiFormatting::CommonMark::HTML". This patch makes the gem required to ensure Redmine starts correctly.


git-svn-id: https://svn.redmine.org/redmine/trunk@23734 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2025-05-01 10:28:14 +00:00
parent 2ec9ee5a32
commit 444a94c7cb
3 changed files with 2 additions and 13 deletions

View File

@@ -408,9 +408,7 @@ module Redmine
WikiFormatting.map do |format|
format.register :textile
if Object.const_defined?(:Commonmarker)
format.register :common_mark, label: 'CommonMark Markdown (GitHub Flavored)'
end
format.register :common_mark, label: 'CommonMark Markdown (GitHub Flavored)'
end
ActionView::Template.register_template_handler :rsb, Views::ApiTemplateHandler