common.js: handle compound names
This commit is contained in:
parent
ff3e83e9ee
commit
f27072db16
@ -2,7 +2,7 @@ String.prototype.capitalize = function() {
|
||||
return this
|
||||
.toLowerCase()
|
||||
.replace(
|
||||
/(^|\s)([a-z])/g,
|
||||
/(^|\s|-)([a-z])/g,
|
||||
function(m,p1,p2) { return p1+p2.toUpperCase(); }
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user