FEATURE: Add support for Unicode usernames and group names

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
Gerhard Schlager
2019-04-23 12:22:47 +02:00
parent d07605d885
commit a7bc1ecbae
29 changed files with 908 additions and 193 deletions

View File

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