From 0076e1cf01834b49a4c73bab9113971639de9ac9 Mon Sep 17 00:00:00 2001 From: bscan <10503608+bscan@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:55:41 -0500 Subject: Bug fix. TS regexes are not done in place. --- server/src/parser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/src/parser.ts b/server/src/parser.ts index 753b379..700a5a5 100644 --- a/server/src/parser.ts +++ b/server/src/parser.ts @@ -513,9 +513,9 @@ function SubEndLine(state: ParserState, rFilter: RegExp | null = null): number { let stmt = state.codeArray[i]; if (i == state.line_number) { - if (rFilter) stmt.replace(rFilter, ""); + if (rFilter) stmt = stmt.replace(rFilter, ""); // Default argument of empty hash. Other types of hashes may still trip this up - stmt.replace(/\$\w+\s*=\s*\{\s*\}/, ""); + stmt = stmt.replace(/\$\w+\s*=\s*\{\s*\}/, ""); if(stmt.match(/;\s*$/)){ // "Forward" declaration, such as `sub foo;` return i; -- cgit v1.2.3