Browse Source

Merge pull request #1 from TDFM/bugfix

bug fix for head and tail quote character
pull/2/head
Matt 11 years ago
parent
commit
30fef0b4b2
  1. 8
      jquery.parse.js

8
jquery.parse.js

@ -152,10 +152,10 @@ @@ -152,10 +152,10 @@
function handleQuote()
{
var delimBefore = _state.i > 0
&& isBoundary(_input[_state.i-1]);
var delimAfter = _state.i < _input.length - 1
&& isBoundary(_input[_state.i+1]);
var delimBefore = (_state.i > 0 && isBoundary(_input[_state.i-1]))
|| _state.i == 0;
var delimAfter = (_state.i < _input.length - 1 && isBoundary(_input[_state.i+1]))
|| _state.i == _input.length - 1;
var escaped = _state.i < _input.length - 1
&& _input[_state.i+1] == '"';

Loading…
Cancel
Save