Skip to content

Commit 2d9708d

Browse files
committed
2 parents faa2cd6 + 4226eea commit 2d9708d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

out/notebooks/splunk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export function dispatchSpl2Module(service: any, spl2Module: string, app: string
129129
namespace = '';
130130
app = app || 'search'; // default to search app
131131
// Get last statement assignment '$my_statement = ...' -> 'my_statement'
132-
const statementMatches = [...spl2Module.matchAll(/\$([a-zA-Z0-9_]+)[\s]*=/gm)];
132+
const statementMatches = [...spl2Module.matchAll(/^\s*\$([a-zA-Z0-9_]+)[\s]*=/gm)];
133133
if (!statementMatches
134134
|| statementMatches.length < 1
135135
|| statementMatches[statementMatches.length - 1].length < 2) {

0 commit comments

Comments
 (0)