From 44822746450c189bb31452690600bf44491cdf4e Mon Sep 17 00:00:00 2001 From: Douglas Crockford Date: Mon, 20 Feb 2012 19:41:30 -0800 Subject: [PATCH] Remove an IE workaround, hoping that Microsoft will fix it. --- jslint.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/jslint.js b/jslint.js index c601153ee..a482d5586 100644 --- a/jslint.js +++ b/jslint.js @@ -1,5 +1,5 @@ // jslint.js -// 2012-02-17 +// 2012-02-19 // Copyright (c) 2002 Douglas Crockford (www.JSLint.com) @@ -924,9 +924,8 @@ var JSLINT = (function () { // unsafe comment or string ax = /@cc|<\/?|script|\]\s*\]|<\s*!|</i, -// carriage return, or carriage return linefeed - crx = /\r/g, - crlfx = /\r\n/g, +// linefeed, carriage return, or carriage return linefeed + crlfx = /\n|\r\n?/, // unsafe characters that are silently deleted by one or more browsers cx = /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/, // query characters for ids @@ -1684,10 +1683,7 @@ klass: do { return { init: function (source) { if (typeof source === 'string') { - lines = source - .replace(crlfx, '\n') - .replace(crx, '\n') - .split('\n'); + lines = source.split(crlfx); } else { lines = source; } @@ -6389,7 +6385,7 @@ klass: do { }; itself.jslint = itself; - itself.edition = '2012-02-17'; + itself.edition = '2012-02-19'; return itself; }());