diff --git a/Gemfile b/Gemfile index 9cde32ec8..add1363f7 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'propshaft', '~> 1.1.0' gem 'rack', '>= 3.1.3' gem "stimulus-rails", "~> 1.3" gem "importmap-rails", "~> 2.0" -gem 'commonmarker', '~> 2.3.0' +gem 'commonmarker', '~> 2.3.2' gem "doorkeeper", "~> 5.8.2" gem "bcrypt", require: false gem "doorkeeper-i18n", "~> 5.2" diff --git a/lib/redmine/wiki_formatting/common_mark/formatter.rb b/lib/redmine/wiki_formatting/common_mark/formatter.rb index 8b7a18394..2b5f3f163 100644 --- a/lib/redmine/wiki_formatting/common_mark/formatter.rb +++ b/lib/redmine/wiki_formatting/common_mark/formatter.rb @@ -35,6 +35,7 @@ module Redmine tasklist: true, shortcodes: false, alerts: true, + cjk_friendly_emphasis: true, }.freeze, # https://github.com/gjtorikian/commonmarker#parse-options diff --git a/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb index bb0c5d450..f2f95ad8a 100644 --- a/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb @@ -342,6 +342,13 @@ class Redmine::WikiFormatting::CommonMark::FormatterTest < ActionView::TestCase assert_not_include 'markdown-alert', html end + def test_should_enable_cjk_friendly_emphasis_extension + assert_equal( + "

この文は重要です。而且,这句话也非常重要。이 문장은 중요하지 않습니다.

", + to_html("**この文は重要です。**而且,**这句话也非常重要。**이 문장은 중요하지 않습니다.") + ) + end + private def assert_section_with_hash(expected, text, index)