Skip to content

Commit d6106f6

Browse files
committed
Update PARM_REGEX to match at the start or whitespace
Now keywords can appear in column 1 or anywhere after column 1 provided at least 1 space is detected before the keyword.
1 parent ce21943 commit d6106f6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ui/actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export type ActionTarget = {
3535
}
3636

3737
const actionUsed: Map<string, number> = new Map;
38-
const PARM_REGEX = / (PNLGRP|OBJ|PGM|MODULE|FILE|MENU)\((?<object>.+?)\)/;
38+
const PARM_REGEX = /(^|\s+)(PNLGRP|OBJ|PGM|MODULE|FILE|MENU)\((?<object>.+?)\)/;
3939

4040
export function registerActionTools(context: vscode.ExtensionContext) {
4141
context.subscriptions.push(
@@ -837,4 +837,4 @@ async function outputToFile(connection: IBMi, outputPattern: string, variables:
837837
actualPath = (await connection.sendCommand({ command: `echo ${actualPath}` })).stdout;
838838
}
839839
await connection.getContent().writeStreamfileRaw(actualPath, output.join(""));
840-
}
840+
}

0 commit comments

Comments
 (0)