From c68dbd777efa848650d5abec7a7c78fbd6a76339 Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Sat, 18 Feb 2012 20:20:25 -0600 Subject: [PATCH] Relax EI search for inline images --- src/parser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser.js b/src/parser.js index fc448ff66..fc8f5bc66 100644 --- a/src/parser.js +++ b/src/parser.js @@ -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;