Skip to content

Commit

Permalink
Relax EI search for inline images
Browse files Browse the repository at this point in the history
  • Loading branch information
notmasteryet committed Feb 19, 2012
1 parent fe6ded2 commit c68dbd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ var Parser = (function ParserClosure() {
// parse image stream
var startPos = stream.pos;

// searching for the /\sEI\s/
// searching for the /EI\s/
var state = 0, ch;
while (state != 4 && (ch = stream.getByte()) != null) {
switch (ch) {
case 0x20:
case 0x0D:
case 0x0A:
state = state === 3 ? 4 : 1;
state = state === 3 ? 4 : 0;
break;
case 0x45:
state = state === 1 ? 2 : 0;
state = 2;
break;
case 0x49:
state = state === 2 ? 3 : 0;
Expand Down

0 comments on commit c68dbd7

Please sign in to comment.