From 753b27afe00e6ba65b918007ff2c61aa1112863a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 27 Jul 2016 14:11:58 +0200 Subject: [PATCH] Minor code and comments cleanup. --- src/core/Base.js | 4 ++-- src/core/PaperScope.js | 2 +- src/node/window.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/Base.js b/src/core/Base.js index ff0b5b04..7c8819c1 100644 --- a/src/core/Base.js +++ b/src/core/Base.js @@ -613,13 +613,13 @@ Base.inject(/** @lends Base# */{ * Camelizes the passed hyphenated string: caps-lock -> capsLock */ camelize: function(str) { - return str.replace(/-(.)/g, function(all, chr) { + return str.replace(/-(.)/g, function(match, chr) { return chr.toUpperCase(); }); }, /** - * Converst camelized strings to hyphenated ones: CapsLock -> caps-lock + * Converts camelized strings to hyphenated ones: CapsLock -> caps-lock */ hyphenate: function(str) { return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); diff --git a/src/core/PaperScope.js b/src/core/PaperScope.js index 343cf0e0..a6c4f0ab 100644 --- a/src/core/PaperScope.js +++ b/src/core/PaperScope.js @@ -89,7 +89,7 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{ // only difference to jQuery.browser user.replace( /(opera|chrome|safari|webkit|firefox|msie|trident|atom|node)\/?\s*([.\d]+)(?:.*version\/([.\d]+))?(?:.*rv\:v?([.\d]+))?/g, - function(all, n, v1, v2, rv) { + function(match, n, v1, v2, rv) { // Do not set additional browsers once chrome is detected. if (!agent.chrome) { var v = n === 'opera' ? v2 : diff --git a/src/node/window.js b/src/node/window.js index 5987e4f5..8dcd4e20 100644 --- a/src/node/window.js +++ b/src/node/window.js @@ -45,7 +45,7 @@ XMLSerializer.prototype.serializeToString = function(node) { var tagName = tagNames[i]; text = text.replace( new RegExp('(<|