Browse Source

Fix for empty line at beginning of files

pull/33/head 2.0.5
Matthew Holt 11 years ago
parent
commit
f25df7194f
  1. 2
      bower.json
  2. 15
      jquery.parse.js
  3. 4
      jquery.parse.min.js
  4. 2
      parse.jquery.json

2
bower.json

@ -31,6 +31,6 @@
"tests" "tests"
], ],
"dependencies": { "dependencies": {
"jquery": ">=1.5" "jquery": ">=1.6.0"
} }
} }

15
jquery.parse.js

@ -1,6 +1,6 @@
/* /*
Papa Parse Papa Parse
v2.0.4 v2.0.5
https://github.com/mholt/jquery.parse https://github.com/mholt/jquery.parse
*/ */
@ -476,12 +476,15 @@
_state.errors.length = 0; _state.errors.length = 0;
} }
if (_config.header && _state.lineNum > 0) if (_config.header)
{ {
if (streaming()) if (_state.lineNum > 0)
_state.parsed.rows = [ {} ]; {
else if (streaming())
_state.parsed.rows.push({}); _state.parsed.rows = [ {} ];
else
_state.parsed.rows.push({});
}
} }
else else
{ {

4
jquery.parse.min.js vendored

File diff suppressed because one or more lines are too long

2
parse.jquery.json

@ -1,6 +1,6 @@
{ {
"name": "parse", "name": "parse",
"version": "2.0.4", "version": "2.0.5",
"title": "Papa Parse", "title": "Papa Parse",
"description": "Papa is a powerful CSV (delimited text) parser that streams large files and gracefully handles malformed input.", "description": "Papa is a powerful CSV (delimited text) parser that streams large files and gracefully handles malformed input.",
"keywords": [ "keywords": [

Loading…
Cancel
Save