mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 00:36:14 +02:00
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:
2
Gemfile
2
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"
|
||||
|
||||
@@ -35,6 +35,7 @@ module Redmine
|
||||
tasklist: true,
|
||||
shortcodes: false,
|
||||
alerts: true,
|
||||
cjk_friendly_emphasis: true,
|
||||
}.freeze,
|
||||
|
||||
# https://github.com/gjtorikian/commonmarker#parse-options
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user