Browse files

Use " instead of ' for attribute names

  • Loading branch information...
1 parent 9bbb074 commit 7a5fbf249345f1ae55cc99e7e037c397cb2f66ba @pirxpilot committed Mar 6, 2012
Showing with 9 additions and 9 deletions.
  1. +1 −1 lib/index.js
  2. +1 −1 package.json
  3. +7 −7 test/index.test.js
View
2 lib/index.js
@@ -14,7 +14,7 @@ function escape(text) {
function attr(out, name, value) {
- out.write(' ' + name + "='" + value + "'");
+ out.write(' ' + name + '="' + value + '"');
}
function elem(name, attrs) {
View
2 package.json
@@ -2,7 +2,7 @@
"name" : "gexode",
"description" : "Primitive XML generator for node.js",
"keywords": ["xml"],
- "version" : "0.0.1",
+ "version" : "0.0.2",
"author" : "Damian Krzeminski <pirxpilot@code42day.org>",
"engines" : {"node" : ">=0.2.0"},
"main" : "lib/index.js",
View
14 test/index.test.js
@@ -48,7 +48,7 @@ module.exports = {
});
a.write(b);
- assert.equal("<klm name='kuku' value='5'></klm>", b.toString());
+ assert.equal('<klm name="kuku" value="5"></klm>', b.toString());
},
'text': function () {
@@ -61,7 +61,7 @@ module.exports = {
a.write(b);
- assert.equal("<klm name='kuku'>bongo bongo</klm>", b.toString());
+ assert.equal('<klm name="kuku">bongo bongo</klm>', b.toString());
},
'children': function () {
@@ -72,14 +72,14 @@ module.exports = {
});
car.add(elem('driver', { name: 'Betty' }));
- car.add(elem('passanger', { age: '17' }).text('Adam'));
+ car.add(elem('passenger', { age: '17' }).text('Adam'));
car.write(b);
- assert.equal("<volvo type='sedan'>" +
- "<driver name='Betty'></driver>" +
- "<passanger age='17'>Adam</passanger>" +
- "</volvo>", b.toString());
+ assert.equal('<volvo type="sedan">' +
+ '<driver name="Betty"></driver>' +
+ '<passenger age="17">Adam</passenger>' +
+ '</volvo>', b.toString());
},
'escape': function() {

0 comments on commit 7a5fbf2

Please sign in to comment.