From f3e82e09a4986c68b268ecd18834c187dfa0ea2b Mon Sep 17 00:00:00 2001 From: p0n1 <36690236+p0n1@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:42:24 +0800 Subject: [PATCH] fix: scope word regex handle case like 'contracts/v(a)/example.sol' --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 81fa57a..94bfefc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -34,7 +34,7 @@ const main = async ( if (!!scopeFile || !!scope) { // Scope is specified in a .txt file or is passed in a string const content = scope ?? fs.readFileSync(scopeFile as string, { encoding: 'utf8', flag: 'r' }); - for (const word of [...content.matchAll(/[a-zA-Z\/\.\-\_0-9]+/g)].map(r => r[0])) { + for (const word of [...content.matchAll(/[a-zA-Z\/\.\-\_\(\)0-9]+/g)].map(r => r[0])) { if (word.endsWith('.sol') && fs.existsSync(`${basePath}${word}`)) { fileNames.push(word); }