mirror of
https://github.com/mshick/add-pr-comment.git
synced 2025-12-31 14:20:32 +11:00
new build
This commit is contained in:
parent
445c144052
commit
84c8c4f13e
3 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue