[Pkg-javascript-commits] [node-cssstyle] 11/39: removed trailing space on getCssText() per comment from Domenic Denicola

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Sep 20 19:37:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to branch master
in repository node-cssstyle.

commit f6cea8a3614eeef0169572287649873f25e5e212
Author: Chad Walker <chad at chad-cat-lore-eddie.com>
Date:   Mon Oct 8 08:59:43 2012 -0500

    removed trailing space on getCssText() per comment from Domenic Denicola
---
 lib/CSSStyleDeclaration.js | 4 ++--
 package.json               | 2 +-
 tests/tests.js             | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/CSSStyleDeclaration.js b/lib/CSSStyleDeclaration.js
index 6366272..b5b77b8 100644
--- a/lib/CSSStyleDeclaration.js
+++ b/lib/CSSStyleDeclaration.js
@@ -126,9 +126,9 @@ var CSSStyleDeclaration = function CSSStyleDeclaration() {
             if (priority !== '') {
                 priority = " !" + priority;
             }
-            properties.push(name, ': ', value, priority, '; ');
+            properties.push([name, ': ', value, priority, ';'].join(''));
         }
-        return properties.join('');
+        return properties.join(' ');
     };
 
     /**
diff --git a/package.json b/package.json
index 4b00645..762561f 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
     "name": "cssstyle",
     "description": "CSSStyleDeclaration Object Model implementation",
     "keywords": ["CSS", "CSSStyleDeclaration", "StyleSheet"],
-    "version": "0.2.1",
+    "version": "0.2.2",
     "homepage": "https://github.com/chad3814/CSSStyleDeclaration",
     "maintainers": [{
         "name": "Chad Walker",
diff --git a/tests/tests.js b/tests/tests.js
index 6293cc0..6e9f753 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -41,7 +41,7 @@ module.exports = {
         test.expect(8);
         style.cssText = 'color: blue; background-color: red; width: 78%';
         test.ok(3 === style.length, 'length is not 3');
-        test.ok('color: blue; background-color: red; width: 78%; ' === style.cssText, 'cssText is wrong');
+        test.ok('color: blue; background-color: red; width: 78%;' === style.cssText, 'cssText is wrong');
         test.ok('blue' === style.getPropertyValue('color'), "getPropertyValue('color') failed");
         test.ok('color' === style.item(0), 'item(0) failed');
         test.ok('background-color' === style[1], 'style[1] failed');
@@ -57,14 +57,14 @@ module.exports = {
         style.color = 'blue';
         test.ok(1 === style.length, 'length is not 1');
         test.ok('color' === style[0], 'style[0] is not color');
-        test.ok('color: blue; ' === style.cssText, 'cssText is wrong');
+        test.ok('color: blue;' === style.cssText, 'cssText is wrong');
         test.ok('color' === style.item(0), 'item(0) is not color');
         test.ok('blue' === style.color, 'color is not blue');
         style.backgroundColor = 'red';
         test.ok(2 === style.length, 'length is not 2');
         test.ok('color' === style[0], 'style[0] is not color');
         test.ok('background-color' === style[1], 'style[1] is not background-color');
-        test.ok('color: blue; background-color: red; ' === style.cssText, 'cssText is wrong');
+        test.ok('color: blue; background-color: red;' === style.cssText, 'cssText is wrong');
         test.ok('red' === style.backgroundColor, 'backgroundColor is not red');
         style.removeProperty('color');
         test.ok('background-color' === style[0], 'style[0] is not background-color');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-cssstyle.git



More information about the Pkg-javascript-commits mailing list