Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var CH_LF = 10,
LITPLACEHOLDER = String.fromCharCode(0),
EMPTY_READCB = function(n) {},
RE_INTEGER = /^\d+$/,
RE_PRECEDING = /^(?:(?:\*|A\d+) )|\+ ?/,
RE_PRECEDING = /^(?:(?:\*|A\d+) )|^\+ ?/,
RE_BODYLITERAL = /BODY\[(.*)\] \{(\d+)\}$/i,
RE_BODYINLINEKEY = /^BODY\[(.*)\]$/i,
RE_SEQNO = /^\* (\d+)/,
Expand Down
4 changes: 4 additions & 0 deletions test/test-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ var CR = '\r', LF = '\n', CRLF = CR + LF;
expected: [ 'IDLE OK IDLE terminated' ],
what: 'Unknown line'
},
{ source: ['IDLE OK Idle completed (0.001 + 0.081 + 0.081 secs).', CRLF],
expected: [ 'IDLE OK Idle completed (0.001 + 0.081 + 0.081 secs).' ],
what: 'Unknown line with + char'
},
{ source: ['+ idling', CRLF],
expected: [ { textCode: undefined,
text: 'idling'
Expand Down