Hi, my code pass all tests except third ( spinalCase("The_Andy_Griffith_Show") ) but somehow in output i see diffrent test: spinalCase("The_Andy_<wbr>Griffith_Show") should return "the-andy-griffith-show".
So it is bug? Or i need to make function and for that case ( "The_Andy_<wbr>Griffith_Show") ?
Your code so far
function spinalCase(str) {
// "It's such a fine line between stupid, and clever."
// --David St. Hubbins
return str.split(/(?=[A-Z_])|\W/).join("-").toLowerCase();
}
spinalCase("The_Andy_Griffith_Show");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0.
that <wbr> has been popping up in a few different test sets. Saw two questions about it last night. If ever you see that in the expected output, assume that it ain’t supposed to be there.
Yeah, it’s a bug, got introduced recently I think. If you feel so inclined, stretch your github skills and file a bug report about it!
I will keep digging, I could have sworn it was a post I’d commented on yesterday, but now my eyeballs hurt from looking through my history. It was a simple string output thing, and the failure message in the console included the <wbr>. If I find it (or any others) I’ll pm them to you.