Merge pull request #1246 from notmasteryet/issue-1222
Relax EI search for inline images
This commit is contained in:
commit
1703e33cfe
@ -120,17 +120,17 @@ var Parser = (function ParserClosure() {
|
|||||||
// parse image stream
|
// parse image stream
|
||||||
var startPos = stream.pos;
|
var startPos = stream.pos;
|
||||||
|
|
||||||
// searching for the /\sEI\s/
|
// searching for the /EI\s/
|
||||||
var state = 0, ch;
|
var state = 0, ch;
|
||||||
while (state != 4 && (ch = stream.getByte()) != null) {
|
while (state != 4 && (ch = stream.getByte()) != null) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 0x20:
|
case 0x20:
|
||||||
case 0x0D:
|
case 0x0D:
|
||||||
case 0x0A:
|
case 0x0A:
|
||||||
state = state === 3 ? 4 : 1;
|
state = state === 3 ? 4 : 0;
|
||||||
break;
|
break;
|
||||||
case 0x45:
|
case 0x45:
|
||||||
state = state === 1 ? 2 : 0;
|
state = 2;
|
||||||
break;
|
break;
|
||||||
case 0x49:
|
case 0x49:
|
||||||
state = state === 2 ? 3 : 0;
|
state = state === 2 ? 3 : 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user