Browse Source

Skipping \r (carriage return) characters for better Windows compatibility

pull/8/head
Matthew Holt 11 years ago
parent
commit
221cb02b4c
  1. 3
      jquery.parse.js

3
jquery.parse.js

@ -185,6 +185,7 @@
function appendCharToField() function appendCharToField()
{ {
if (_state.ch != '\r')
_state.fieldVal += _state.ch; _state.fieldVal += _state.ch;
} }
@ -214,9 +215,7 @@
if (_config.header) if (_config.header)
{ {
if (_state.lineNum == 1) if (_state.lineNum == 1)
{
_state.parsed.fields.push(_state.fieldVal) _state.parsed.fields.push(_state.fieldVal)
}
else else
{ {
var currentRow = _state.parsed.rows[_state.parsed.rows.length - 1]; var currentRow = _state.parsed.rows[_state.parsed.rows.length - 1];

Loading…
Cancel
Save