htmljs-parser
Advanced tools
Comparing version 1.5.12 to 1.5.13
@@ -125,2 +125,10 @@ 'use strict'; | ||
// Strip off the byte order mark (BOM) sequence | ||
// at the beginning of the file: | ||
// - https://en.wikipedia.org/wiki/Byte_order_mark | ||
// > The Unicode Standard permits the BOM in UTF-8, but does not require or recommend its use. | ||
if (data.charCodeAt(0) === 0xFEFF) { | ||
data = data.slice(1); | ||
} | ||
this.data = data; | ||
@@ -127,0 +135,0 @@ this.maxPos = data.length - 1; |
@@ -38,3 +38,3 @@ { | ||
}, | ||
"version": "1.5.12" | ||
"version": "1.5.13" | ||
} |
@@ -9,2 +9,4 @@ exports.getSource = function() { | ||
].join('\r\n'); | ||
}; | ||
}; | ||
exports.preserveLineEndings = true; |
@@ -70,2 +70,6 @@ var chai = require('chai'); | ||
if (!options || (options.preserveLineEndings !== true)) { | ||
inputHtmlJs = inputHtmlJs.replace(/\r\n|\n/g, "\n"); | ||
} | ||
if (options && options.checkThrownError) { | ||
@@ -72,0 +76,0 @@ var error; |
@@ -153,2 +153,8 @@ 'use strict'; | ||
// Strip off the BOM character sequence so that substring tests | ||
// will match the parsed result | ||
if (src.charCodeAt(0) === 0xFEFF) { | ||
src = src.slice(1); | ||
} | ||
this.src = src; | ||
@@ -155,0 +161,0 @@ this.includePositions = options && options.includePositions === true; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
174463
413
3056