mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #13836 from timvandermeij/cmaps
Fix inefficient regular expressions in `external/cmapscompress/parse.js`
This commit is contained in:
commit
1ea8cfa2f2
1 changed files with 2 additions and 2 deletions
4
external/cmapscompress/parse.js
vendored
4
external/cmapscompress/parse.js
vendored
|
@ -28,9 +28,9 @@ exports.parseAdobeCMap = function (content) {
|
|||
usecmap: null,
|
||||
body: [],
|
||||
};
|
||||
m = /\/CMapType\s+(\d+)+\s+def\b/.exec(body);
|
||||
m = /\/CMapType\s+(\d+)\s+def\b/.exec(body);
|
||||
result.type = +m[1];
|
||||
m = /\/WMode\s+(\d+)+\s+def\b/.exec(body);
|
||||
m = /\/WMode\s+(\d+)\s+def\b/.exec(body);
|
||||
result.wmode = +m[1];
|
||||
m = /\/([\w-]+)\s+usecmap\b/.exec(body);
|
||||
if (m) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue