Skip to content

Commit

Permalink
Merge pull request #252 from adrg/inline-image-stream-end
Browse files Browse the repository at this point in the history
Add whitespace tolerance when searching for inline image EI operand
  • Loading branch information
gunnsth authored Feb 10, 2020
2 parents a47c2ea + e9d2f1d commit fdee057
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 fdee057

Please sign in to comment.