Browse Source

fixing lint errors

pull/542/head
jaymeans 7 years ago
parent
commit
b99552c262
  1. 4
      papaparse.js
  2. 2
      tests/test-cases.js

4
papaparse.js

@ -1008,7 +1008,7 @@
*/ */
this.parse = function(input, baseIndex, ignoreLastRow) this.parse = function(input, baseIndex, ignoreLastRow)
{ {
var quoteChar = _config.quoteChar || '"'; var quoteChar = _config.quoteChar || '"';
if (!_config.newline) if (!_config.newline)
_config.newline = guessLineEndings(input, quoteChar); _config.newline = guessLineEndings(input, quoteChar);
@ -1258,7 +1258,7 @@
input = input.substr(0, 1024 * 1024); // max length 1 MB input = input.substr(0, 1024 * 1024); // max length 1 MB
// Replace all the text inside quotes // Replace all the text inside quotes
var re = new RegExp(quoteChar + '(.*?)' + quoteChar, 'gm'); var re = new RegExp(quoteChar + '(.*?)' + quoteChar, 'gm');
input = input.replace(re, '') input = input.replace(re, '');
var r = input.split('\r'); var r = input.split('\r');

2
tests/test-cases.js

@ -1214,7 +1214,7 @@ var PARSE_TESTS = [
input: '"a\r\na","b"\n"c","d"\n"e","f"\n"g","h"\n"i","j"\n', input: '"a\r\na","b"\n"c","d"\n"e","f"\n"g","h"\n"i","j"\n',
config: {}, config: {},
expected: { expected: {
data: [['a\r\na', 'b'], ['c', 'd'], ['e', 'f'], ['g', 'h']['i', 'j']], data: [['a\r\na', 'b'], ['c', 'd'], ['e', 'f'], ['g', 'h'], ['i', 'j']],
errors: [] errors: []
} }
} }

Loading…
Cancel
Save