mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 00:37:44 +08:00
FEATURE: Add support for Unicode usernames and group names
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
@ -336,6 +336,21 @@ describe PrettyText do
|
||||
expect(PrettyText.cook(". http://test/@sam")).not_to include('mention')
|
||||
end
|
||||
|
||||
context "with Unicode usernames disabled" do
|
||||
before { SiteSetting.unicode_usernames = false }
|
||||
|
||||
it 'does not detect mention' do
|
||||
expect(PrettyText.cook("Hello @狮子")).to_not include("mention")
|
||||
end
|
||||
end
|
||||
|
||||
context "with Unicode usernames enabled" do
|
||||
before { SiteSetting.unicode_usernames = true }
|
||||
|
||||
it 'does detect mention' do
|
||||
expect(PrettyText.cook("Hello @狮子")).to match_html '<p>Hello <span class="mention">@狮子</span></p>'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "code fences" do
|
||||
|
Reference in New Issue
Block a user