Skip to content

Commit

Permalink
Add whitespace tolerance when searching for inline image EI operand
Browse files Browse the repository at this point in the history
  • Loading branch information
adrg committed Feb 10, 2020
1 parent e2b3c6e commit e9d2f1d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contentstream/inline-image.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,12 @@ func (csp *ContentStreamParser) ParseInlineImage() (*ContentStreamInlineImage, e
skipBytes = []byte{}
skipBytes = append(skipBytes, c)
state = 1
} else if c == 'E' {
// Allow cases where EI is not preceded by whitespace.
// The extra parsing after EI<ws> should be sufficient
// in order to decide if the image stream ended.
skipBytes = append(skipBytes, c)
state = 2
} else {
im.stream = append(im.stream, c)
}
Expand Down

0 comments on commit e9d2f1d

Please sign in to comment.