BUGFIX: fix username breakup so it works with IE

FEATURE: breakup username based on name as well
This commit is contained in:
Sam
2013-12-30 16:07:35 +11:00
parent b8184d8b92
commit d8c43f7b58
5 changed files with 32 additions and 13 deletions

View File

@ -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>&#8203;Mans<wbr>&#8203;11");
equal(b("he_man"), "he_<wbr>&#8203;man");
equal(b("he11111"), "he<wbr>&#8203;11111");
equal(b("HRCBob"), "HRC<wbr>&#8203;Bob");
equal(b("bobmarleytoo","Bob Marley Too"), "bob<wbr>&#8203;marley<wbr>&#8203;too");
});