mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 19:44:31 +08:00
BUGFIX: fix username breakup so it works with IE
FEATURE: breakup username based on name as well
This commit is contained in:
@ -192,13 +192,14 @@ test("updateRelativeAge", function(){
|
||||
|
||||
test("breakUp", function(){
|
||||
|
||||
var b = function(s){ return Discourse.Formatter.breakUp(s); };
|
||||
var b = function(s,hint){ return Discourse.Formatter.breakUp(s,hint); };
|
||||
|
||||
equal(b("hello"), "hello");
|
||||
equal(b("helloworld"), "helloworld");
|
||||
equal(b("HeMans11"), "He<wbr>Mans<wbr>11");
|
||||
equal(b("he_man"), "he_<wbr>man");
|
||||
equal(b("he11111"), "he<wbr>11111");
|
||||
equal(b("HRCBob"), "HRC<wbr>Bob");
|
||||
equal(b("HeMans11"), "He<wbr>​Mans<wbr>​11");
|
||||
equal(b("he_man"), "he_<wbr>​man");
|
||||
equal(b("he11111"), "he<wbr>​11111");
|
||||
equal(b("HRCBob"), "HRC<wbr>​Bob");
|
||||
equal(b("bobmarleytoo","Bob Marley Too"), "bob<wbr>​marley<wbr>​too");
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user