From bb59bee1f4e2f69c1fa59e60dda74aaa15b3ba53 Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Tue, 24 Oct 2023 22:39:24 +0200 Subject: [PATCH] Fix syntax error --- replace-string/action.yml | 4 +++- replace-string/index.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/replace-string/action.yml b/replace-string/action.yml index 17658e6..52b88a9 100644 --- a/replace-string/action.yml +++ b/replace-string/action.yml @@ -1,7 +1,9 @@ --- name: Replace string description: | - Replaces string... + This action replaces a specified string using regular expression. + It can be passed as an input or read from a file. + Also, the output string can be additional written to file. inputs: string: description: String to be replaced diff --git a/replace-string/index.js b/replace-string/index.js index 38bbcbd..a5eb1bd 100644 --- a/replace-string/index.js +++ b/replace-string/index.js @@ -34,7 +34,7 @@ try { } const regex = new RegExp(inReplaceRegex, inFlags); - strReplaced = string.replace(regex, inReplaceWith); + strReplaced = strToReplace.replace(regex, inReplaceWith); // Output