common.js: handle compound names

This commit is contained in:
nemunaire 2018-12-05 05:23:36 +01:00
parent ff3e83e9ee
commit f27072db16

View File

@ -2,7 +2,7 @@ String.prototype.capitalize = function() {
return this return this
.toLowerCase() .toLowerCase()
.replace( .replace(
/(^|\s)([a-z])/g, /(^|\s|-)([a-z])/g,
function(m,p1,p2) { return p1+p2.toUpperCase(); } function(m,p1,p2) { return p1+p2.toUpperCase(); }
); );
} }