From f8e480bfee3db0e0238d912070362c7fb8684fd4 Mon Sep 17 00:00:00 2001 From: qugalet Date: Thu, 13 Jul 2023 15:07:32 +0300 Subject: [PATCH] fixed regex reading --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 1bf9afc..0fb0ab4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,7 +20,7 @@ function parseAsyncRegexFile(file: Buffer): RegExp[] { const data = file.toString(); return data .split('\n') - .filter(regex => !regex.trim().startsWith('#')) + .filter(regex => !regex.startsWith('#') && regex.trim() !== '') .map(regex => new RegExp(regex)); }