Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use \n instead of \r\n

  • Loading branch information...
commit 120ad3eeff7898f2a8ed11457fdc27c08994cccb 1 parent 2205d21
@tmpvar authored
View
2  example/pure/sax.js
@@ -28,7 +28,7 @@ SAXParser.prototype = {
}
// character classes and tokens
-var whitespace = "\r\n\t ",
+var whitespace = "\n\t ",
// this really needs to be replaced with character classes.
// XML allows all manner of ridiculous numbers and digits.
number = "0124356789",
View
14 example/sizzle/run.js
@@ -84,19 +84,19 @@ var sys = require("sys");
var id = doc.createElement("em");
var salary = doc.createElement("sup");
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(id);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(name);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(position);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(salary);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(gender);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(address);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
staff.appendChild(employee);
names.push(name);
View
2  example/sizzle/sax.js
@@ -28,7 +28,7 @@ SAXParser.prototype = {
}
// character classes and tokens
-var whitespace = "\r\n\t ",
+var whitespace = "\n\t ",
// this really needs to be replaced with character classes.
// XML allows all manner of ridiculous numbers and digits.
number = "0124356789",
View
2  test/browser/index.js
@@ -173,7 +173,7 @@ exports.tests = {
doc.documentElement.style.color = 'black';
doc.documentElement.style.backgroundColor = 'white';
assertEquals('',
- '<html style="color: black; background-color: white"></html>\r\n',
+ '<html style="color: black; background-color: white"></html>\n',
require('../../lib/jsdom/browser/domtohtml').domToHtml(doc));
},
innerhtml_removeallchildren: function() {
View
2  test/collector.php
@@ -33,4 +33,4 @@
}
-file_put_contents($outputFile, "exports.tests = {\r\n".implode(",\r\n", array_filter($functionBodies)) . '\r\n}');
+file_put_contents($outputFile, "exports.tests = {\n".implode(",\n", array_filter($functionBodies)) . '\n}');
View
2  test/jsdom/index.js
@@ -603,7 +603,7 @@ bye = bye + "bye";\
assertEquals('unchanged', true, option1.defaultSelected);
},
case_sensitivity_of_markup_missing_html_and_body : function(){
- var spaces = /[ \r\n]*/g,
+ var spaces = /[ \n]*/g,
doc1 = jsdom.html("<HTML><BODY></BODY></HTML>").outerHTML.replace(spaces, ''),
doc2 = jsdom.html("<html><BODY></Body></HTML>").outerHTML.replace(spaces, ''),
doc3 = jsdom.html("<html><body></body></html>").outerHTML.replace(spaces, ''),
View
14 test/level1/core/files/hc_staff.xml.js
@@ -81,19 +81,19 @@ exports.hc_staff = function() {
var id = doc.createElement("em");
var salary = doc.createElement("sup");
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(id);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(name);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(position);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(salary);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(gender);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(address);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
staff.appendChild(employee);
names.push(name);
View
2  test/level1/core/files/staff.xml.js
@@ -108,7 +108,7 @@ exports.staff = function() {
names[1].appendChild(doc.createTextNode("Martha Raynolds"));
names[1].appendChild(doc.createCDATASection("This is a CDATASection with EntityReference number 2 &ent2;"));
- names[1].appendChild(doc.createTextNode("\r\n"));
+ names[1].appendChild(doc.createTextNode("\n"));
names[1].appendChild(doc.createCDATASection("This is an adjacent CDATASection with a reference to a tab &tab;"));
genders[1].appendChild(doc.createTextNode("Female"));
positions[1].appendChild(doc.createTextNode("Secretary"));
View
14 test/level1/html/files/hc_staff.html.js
@@ -80,19 +80,19 @@ exports.hc_staff = function() {
var id = doc.createElement("em");
var salary = doc.createElement("sup");
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(id);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(name);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(position);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(salary);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(gender);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(address);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
staff.appendChild(employee);
names.push(name);
View
16 test/level1/svg/files/hc_staff.svg.js
@@ -89,24 +89,24 @@ exports.hc_staff = function() {
var salary = doc.createElement("sup");
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(id);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(name);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(position);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(salary);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(gender);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
if (i===1) {
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
}
employee.appendChild(address);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
staff.appendChild(employee);
names.push(name);
View
2  test/level1/svg/files/staff.svg.js
@@ -147,7 +147,7 @@ exports.staff = function() {
names[1].appendChild(doc.createTextNode("Martha Raynolds"));
names[1].appendChild(doc.createCDATASection("This is a CDATASection with EntityReference number 2 &ent2;"));
- names[1].appendChild(doc.createTextNode("\r\n"));
+ names[1].appendChild(doc.createTextNode("\n"));
names[1].appendChild(doc.createCDATASection("This is an adjacent CDATASection with a reference to a tab &tab;"));
genders[1].appendChild(doc.createTextNode("Female"));
positions[1].appendChild(doc.createTextNode("Secretary"));
View
14 test/level2/core/files/hc_staff.xml.js
@@ -83,19 +83,19 @@ exports.hc_staff = function() {
var id = doc.createElementNS("http://www.w3.org/2000/xmlns/","em");
var salary = doc.createElementNS("http://www.w3.org/2000/xmlns/","sup");
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(id);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(name);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(position);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(salary);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(gender);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(address);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
staff.appendChild(employee);
names.push(name);
View
14 test/level2/core/files/staff.xml.js
@@ -73,19 +73,19 @@ exports.staff = function() {
var id = doc.createElementNS("http://www.w3.org/2000/xmlns/","id");
var salary = doc.createElementNS("http://www.w3.org/2000/xmlns/","salary");
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(id);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(name);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(position);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(salary);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(gender);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(address);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
staff.appendChild(employee);
// default address
View
14 test/level2/core/files/staff2.xml.js
@@ -83,19 +83,19 @@ exports.staff2 = function() {
var id = doc.createElementNS("http://www.w3.org/2000/xmlns/","em");
var salary = doc.createElementNS("http://www.w3.org/2000/xmlns/","sup");
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(id);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(name);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(position);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(salary);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(gender);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(address);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
staff.appendChild(employee);
names.push(name);
View
2  test/level2/core/files/staffNS.xml.js
@@ -134,7 +134,7 @@ exports.staffNS = function() {
name.appendChild(doc.createTextNode("Martha Raynolds"));
name.appendChild(doc.createCDATASection("This is a CDATASection with EntityReference number 2 &ent2;"));
- name.appendChild(doc.createTextNode("\r\n"));
+ name.appendChild(doc.createTextNode("\n"));
name.appendChild(doc.createCDATASection("This is an adjacent CDATASection with a reference to a tab &tab;"));
gender.appendChild(doc.createTextNode("Female"));
position.appendChild(doc.createTextNode("Secretary"));
View
14 test/level2/events/files/hc_staff.xml.js
@@ -83,19 +83,19 @@ exports.hc_staff = function() {
var id = doc.createElementNS("http://www.w3.org/2000/xmlns/","em");
var salary = doc.createElementNS("http://www.w3.org/2000/xmlns/","sup");
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(id);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(name);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(position);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(salary);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(gender);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(address);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
staff.appendChild(employee);
names.push(name);
View
14 test/level3/core/files/hc_nodtdstaff.xml.js
@@ -83,19 +83,19 @@ exports.hc_staff = function() {
var id = doc.createElementNS("http://www.w3.org/2000/xmlns/","em");
var salary = doc.createElementNS("http://www.w3.org/2000/xmlns/","sup");
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(id);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(name);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(position);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(salary);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(gender);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(address);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
staff.appendChild(employee);
names.push(name);
View
14 test/level3/core/files/hc_staff.xml.js
@@ -83,19 +83,19 @@ exports.hc_staff = function() {
var id = doc.createElementNS("http://www.w3.org/2000/xmlns/","em");
var salary = doc.createElementNS("http://www.w3.org/2000/xmlns/","sup");
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(id);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(name);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(position);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(salary);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(gender);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
employee.appendChild(address);
- employee.appendChild(doc.createTextNode("\r\n"));
+ employee.appendChild(doc.createTextNode("\n"));
staff.appendChild(employee);
names.push(name);
Please sign in to comment.
Something went wrong with that request. Please try again.