diff options
author | bscan <10503608+bscan@users.noreply.github.com> | 2024-02-17 13:55:41 -0500 |
---|---|---|
committer | bscan <10503608+bscan@users.noreply.github.com> | 2024-02-17 13:55:41 -0500 |
commit | 0076e1cf01834b49a4c73bab9113971639de9ac9 (patch) | |
tree | 1b0e261a6b0fc7949a04f8c9494ebbb4efa65ab3 | |
parent | c541e625d6f306c556cbfd755b335a4df64b01a2 (diff) | |
download | PerlNavigator-0076e1cf01834b49a4c73bab9113971639de9ac9.zip |
Bug fix. TS regexes are not done in place.
-rw-r--r-- | server/src/parser.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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; |