Skip to content

Commit

Permalink
fix global match (#1335)
Browse files Browse the repository at this point in the history
  • Loading branch information
BethanyZhou committed Apr 23, 2024
1 parent b522cef commit dd48f75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion powershell/plugins/create-commands-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export /* @internal */ class Inferrer {

async addVariant(vname: string, body: Parameter | null, bodyParameterName: string, parameters: Array<Parameter>, operation: Operation, variant: CommandVariant, state: State, preOperations: Array<Operation> | undefined, commandType?: CommandType): Promise<CommandOperation> {
// beth: filter command description for New/Update command
const createOrUpdateRegex = /(creates? or updates?)|(creates?)|(updates?)/gi;
const createOrUpdateRegex = /^(creates? or updates?)|^(creates?)|^(updates?)/i;
operation.language.default.description = operation.language.default.description.replace(createOrUpdateRegex, `${variant.action.capitalize()}`);
const op = await this.addCommandOperation(vname, parameters, operation, variant, state, preOperations, commandType);

Expand Down

0 comments on commit dd48f75

Please sign in to comment.