File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
apps/sim/app/api/function/execute Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ export const MAX_DURATION = 210
2727
2828const logger = createLogger ( 'FunctionExecuteAPI' )
2929
30+ const TAG_PATTERN = new RegExp (
31+ `${ REFERENCE . START } ([a-zA-Z_](?:\\${ REFERENCE . PATH_DELIMITER } [a-zA-Z0-9_]+|[a-zA-Z0-9_])*)${ REFERENCE . END } ` ,
32+ 'g'
33+ )
34+
3035const E2B_JS_WRAPPER_LINES = 3
3136const E2B_PYTHON_WRAPPER_LINES = 1
3237
@@ -493,11 +498,7 @@ function resolveTagVariables(
493498 let resolvedCode = code
494499 const undefinedLiteral = language === 'python' ? 'None' : 'undefined'
495500
496- const tagPattern = new RegExp (
497- `${ REFERENCE . START } ([a-zA-Z_][a-zA-Z0-9_${ REFERENCE . PATH_DELIMITER } ]*)${ REFERENCE . END } ` ,
498- 'g'
499- )
500- const tagMatches = resolvedCode . match ( tagPattern ) || [ ]
501+ const tagMatches = resolvedCode . match ( TAG_PATTERN ) || [ ]
501502
502503 for ( const match of tagMatches ) {
503504 const tagName = match . slice ( REFERENCE . START . length , - REFERENCE . END . length ) . trim ( )
You can’t perform that action at this time.
0 commit comments