Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use " instead of ' for attribute names

  • Loading branch information...
commit 7a5fbf249345f1ae55cc99e7e037c397cb2f66ba 1 parent 9bbb074
pirxpilot authored

Showing 3 changed files with 9 additions and 9 deletions. Show diff stats Hide diff stats

  1. +1 1  lib/index.js
  2. +1 1  package.json
  3. +7 7 test/index.test.js
2  lib/index.js
@@ -14,7 +14,7 @@ function escape(text) {
14 14
15 15
16 16 function attr(out, name, value) {
17   - out.write(' ' + name + "='" + value + "'");
  17 + out.write(' ' + name + '="' + value + '"');
18 18 }
19 19
20 20 function elem(name, attrs) {
2  package.json
@@ -2,7 +2,7 @@
2 2 "name" : "gexode",
3 3 "description" : "Primitive XML generator for node.js",
4 4 "keywords": ["xml"],
5   - "version" : "0.0.1",
  5 + "version" : "0.0.2",
6 6 "author" : "Damian Krzeminski <pirxpilot@code42day.org>",
7 7 "engines" : {"node" : ">=0.2.0"},
8 8 "main" : "lib/index.js",
14 test/index.test.js
@@ -48,7 +48,7 @@ module.exports = {
48 48 });
49 49 a.write(b);
50 50
51   - assert.equal("<klm name='kuku' value='5'></klm>", b.toString());
  51 + assert.equal('<klm name="kuku" value="5"></klm>', b.toString());
52 52 },
53 53
54 54 'text': function () {
@@ -61,7 +61,7 @@ module.exports = {
61 61
62 62 a.write(b);
63 63
64   - assert.equal("<klm name='kuku'>bongo bongo</klm>", b.toString());
  64 + assert.equal('<klm name="kuku">bongo bongo</klm>', b.toString());
65 65 },
66 66
67 67 'children': function () {
@@ -72,14 +72,14 @@ module.exports = {
72 72 });
73 73
74 74 car.add(elem('driver', { name: 'Betty' }));
75   - car.add(elem('passanger', { age: '17' }).text('Adam'));
  75 + car.add(elem('passenger', { age: '17' }).text('Adam'));
76 76
77 77 car.write(b);
78 78
79   - assert.equal("<volvo type='sedan'>" +
80   - "<driver name='Betty'></driver>" +
81   - "<passanger age='17'>Adam</passanger>" +
82   - "</volvo>", b.toString());
  79 + assert.equal('<volvo type="sedan">' +
  80 + '<driver name="Betty"></driver>' +
  81 + '<passenger age="17">Adam</passenger>' +
  82 + '</volvo>', b.toString());
83 83 },
84 84
85 85 'escape': function() {

0 comments on commit 7a5fbf2

Please sign in to comment.
Something went wrong with that request. Please try again.