Enables CJK friendly emphasis extension for CommonMark (#43234).

Patch by Katsuya HIDAKA (user:hidakatsuya).


git-svn-id: https://svn.redmine.org/redmine/trunk@24013 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2025-09-25 05:30:33 +00:00
parent c8710e4b32
commit d745168d57
3 changed files with 9 additions and 1 deletions

View File

@@ -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"

View File

@@ -35,6 +35,7 @@ module Redmine
tasklist: true,
shortcodes: false,
alerts: true,
cjk_friendly_emphasis: true,
}.freeze,
# https://github.com/gjtorikian/commonmarker#parse-options

View File

@@ -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(
"<p><strong>この文は重要です。</strong>而且,<strong>这句话也非常重要。</strong>이 문장은 중요하지 않습니다.</p>",
to_html("**この文は重要です。**而且,**这句话也非常重要。**이 문장은 중요하지 않습니다.")
)
end
private
def assert_section_with_hash(expected, text, index)