Comparing version 2.4.1 to 2.4.2
@@ -9,2 +9,6 @@ # Changelog | ||
## [2.4.2] - 2020-10-23 | ||
### Fixed | ||
- Updated PDF parser to ignore comments | ||
## [2.4.1] - 2020-08-08 | ||
@@ -11,0 +15,0 @@ ### Fixed |
@@ -65,2 +65,19 @@ 'use strict' | ||
skipComments(trial) { | ||
if (this.getString(1) !== '%') { | ||
return false | ||
} | ||
let pos = this.pos; | ||
while (this.buf[pos] !== 0x0A) { | ||
pos++; | ||
} | ||
if (!trial) { | ||
this.pos = pos; | ||
} | ||
return true | ||
} | ||
skipWhitespace(len, trial) { | ||
@@ -72,2 +89,9 @@ const before = this.pos | ||
while (!done && (!len || count < len)) { | ||
// skip comments | ||
if (this.buf[this.pos] === 0x25 /* % */) { | ||
while (this.buf[this.pos] !== 0x0A) { | ||
this.pos++; | ||
} | ||
} | ||
if (Lexer.isWhiteSpace(this.buf[this.pos])) { | ||
@@ -74,0 +98,0 @@ this.pos++ |
{ | ||
"name": "pdfjs", | ||
"author": "Markus Ast <npm.m@rkusa.st>", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "A Portable Document Format (PDF) generation library targeting both the server- and client-side.", | ||
@@ -25,8 +25,8 @@ "keywords": [ | ||
"unorm": "^1.6.0", | ||
"uuid": "^8.3.0" | ||
"uuid": "^8.3.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^14.0.27", | ||
"@types/node": "^14.14.2", | ||
"tape": "^5.0.1", | ||
"typescript": "^3.9.7" | ||
"typescript": "^4.0.3" | ||
}, | ||
@@ -33,0 +33,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
341165
6583
Updateduuid@^8.3.1