Skip to content

Commit

Permalink
chore: comment ignored e2e snapshot and update regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryAnansky committed Feb 18, 2025
1 parent 7bc8fb7 commit d7eacd5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function evaluateExpressionsInString(
expression: string,
context: RuntimeExpressionContext
): string {
const regex = /\{([^{}]*|(\{[^{}]*\}))*\}|\$[^\s{}]+(?:\([^()]*\))*/g;
const regex = /\{(?:[^{}]|\{[^{}]*\})*\}|\$[^\s{}]+(?:\([^()]*\))*/g;

return expression.replace(regex, (match) => {
const exprToEvaluate = match.trim();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ export function replaceJSONPointers(expression: string, context: any): string {
},
},
{
pattern: /\$outputs\.([\w\-A-Za-z0-9_]+)#\/([\w/]+)/g,
pattern: /\$outputs\.([\w-]+)#\/([\w/]+)/g,
ctxFunction: (match: string, property: string, pointer: string) => {
return resolvePointer(context.$outputs?.[property], pointer, match);
},
},
{
pattern: /\$workflows\.([\w\-A-Za-z0-9_]+)\.outputs\.([\w\-A-Za-z0-9_]+)#\/([\w/]+)/g,
pattern: /\$workflows\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/]+)/g,
ctxFunction: (match: string, workflowId: string, property: string, pointer: string) => {
return resolvePointer(
context.$workflows?.[workflowId]?.outputs?.[property],
Expand All @@ -31,7 +31,7 @@ export function replaceJSONPointers(expression: string, context: any): string {
},
},
{
pattern: /\$steps\.([\w\-A-Za-z0-9_]+)\.outputs\.([\w\-A-Za-z0-9_]+)#\/([\w/]+)/g,
pattern: /\$steps\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/]+)/g,
ctxFunction: (match: string, stepId: string, property: string, pointer: string) => {
return resolvePointer(context.$steps?.[stepId]?.outputs?.[property], pointer, match);
},
Expand Down

0 comments on commit d7eacd5

Please sign in to comment.