Skip to content

Commit

Permalink
refactor(index): add strict u flag to all regex patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Jul 8, 2023
1 parent 72eea36 commit 06ac742
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class Poppler {
["-v"]
);

const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/.exec(stderr)[1];
const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/u.exec(stderr)[1];

const args = parseOptions(acceptedOptions, options, versionInfo);

Expand Down Expand Up @@ -309,7 +309,7 @@ class Poppler {
["-v"]
);

const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/.exec(stderr)[1];
const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/u.exec(stderr)[1];

const args = parseOptions(acceptedOptions, options, versionInfo);

Expand Down Expand Up @@ -424,7 +424,7 @@ class Poppler {
["-v"]
);

const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/.exec(stderr)[1];
const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/u.exec(stderr)[1];

const args = parseOptions(acceptedOptions, options, versionInfo);

Expand Down Expand Up @@ -467,7 +467,7 @@ class Poppler {
if (stdOut !== "") {
if (fileSize) {
stdOut = stdOut.replace(
/(File\s+size:\s+)0(\s+)bytes/,
/(File\s+size:\s+)0(\s+)bytes/u,
`$1${fileSize}$2bytes`
);
}
Expand Down Expand Up @@ -528,7 +528,7 @@ class Poppler {
["-v"]
);

const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/.exec(stderr)[1];
const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/u.exec(stderr)[1];

const args = parseOptions(acceptedOptions, options, versionInfo);
args.push(file);
Expand Down Expand Up @@ -705,7 +705,7 @@ class Poppler {
["-v"]
);

const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/.exec(stderr)[1];
const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/u.exec(stderr)[1];

const args = parseOptions(acceptedOptions, options, versionInfo);

Expand Down Expand Up @@ -845,7 +845,7 @@ class Poppler {
["-v"]
);

const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/.exec(stderr)[1];
const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/u.exec(stderr)[1];

const args = parseOptions(acceptedOptions, options, versionInfo);

Expand Down Expand Up @@ -1049,7 +1049,7 @@ class Poppler {
["-v"]
);

const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/.exec(stderr)[1];
const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/u.exec(stderr)[1];

const args = parseOptions(acceptedOptions, options, versionInfo);

Expand Down Expand Up @@ -1279,7 +1279,7 @@ class Poppler {
["-v"]
);

const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/.exec(stderr)[1];
const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/u.exec(stderr)[1];

const args = parseOptions(acceptedOptions, options, versionInfo);

Expand Down Expand Up @@ -1428,7 +1428,7 @@ class Poppler {
["-v"]
);

const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/.exec(stderr)[1];
const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/u.exec(stderr)[1];

const args = parseOptions(acceptedOptions, options, versionInfo);

Expand Down Expand Up @@ -1506,7 +1506,7 @@ class Poppler {
["-v"]
);

const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/.exec(stderr)[1];
const versionInfo = /(\d{1,2}\.\d{1,2}\.\d{1,2})/u.exec(stderr)[1];

const args = parseOptions(acceptedOptions, options, versionInfo);
files.forEach((element) => {
Expand Down

0 comments on commit 06ac742

Please sign in to comment.