Commit 5ae09e66 by Jason Williams

fixing mistake made from last commit

parent c84a4b4e
......@@ -18,7 +18,7 @@
// if downcode doesn't hit, the char will be stripped here
s = s.replace(/[^-\w\s]/g, ''); // remove unneeded chars
s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces
s = s.replace(/[-\s]+/g, '-'); // convert spaces to hyphens
s = s.replace(/[-\s]+/g, '_'); // convert spaces to hyphens
s = s.toLowerCase(); // convert to lowercase
return s.substring(0, num_chars);// trim to first num_chars chars
}
......@@ -31,7 +31,7 @@
if(!e._changed) {
slug = URLify(this.value, 50);
/*wikislug = slug.replace(/\-/g, " ");*/
wikislug = wikislug.replace(/\w\S*/gi, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1);});
wikislug = slug.replace(/\w\S*/gi, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1);});
wikislug = wikislug.replace(/\s*/g, "");
e.value = wikislug;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment