new build

This commit is contained in:
Michael Shick 2023-05-07 09:04:04 -04:00
parent 445c144052
commit 84c8c4f13e
No known key found for this signature in database
GPG key ID: ADF5BC9704BB4A61
3 changed files with 5 additions and 5 deletions

4
dist/index.js vendored
View file

@ -451,12 +451,12 @@ function splitFind(find) {
modifiers,
};
}
function findAndReplaceInMessage(find, replacement, original) {
function findAndReplaceInMessage(find, replace, original) {
var _a;
let message = original;
for (const [i, f] of find.entries()) {
const { regExp, modifiers } = splitFind(f);
message = message.replace(new RegExp(regExp, modifiers), (_a = replacement[i]) !== null && _a !== void 0 ? _a : replacement[0]);
message = message.replace(new RegExp(regExp, modifiers), (_a = replace[i]) !== null && _a !== void 0 ? _a : replace.join('\n'));
}
return message;
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -69,12 +69,12 @@ function splitFind(find) {
modifiers,
};
}
function findAndReplaceInMessage(find, replacement, original) {
function findAndReplaceInMessage(find, replace, original) {
var _a;
let message = original;
for (const [i, f] of find.entries()) {
const { regExp, modifiers } = splitFind(f);
message = message.replace(new RegExp(regExp, modifiers), (_a = replacement[i]) !== null && _a !== void 0 ? _a : replacement[0]);
message = message.replace(new RegExp(regExp, modifiers), (_a = replace[i]) !== null && _a !== void 0 ? _a : replace.join('\n'));
}
return message;
}