Skip to content

Commit

Permalink
Allow whitespace in params in native query builder
Browse files Browse the repository at this point in the history
  • Loading branch information
camsaul committed Oct 20, 2017
1 parent 68201e7 commit 417474b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/metabase-lib/lib/queries/NativeQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export default class NativeQuery extends AtomicQuery {
// a variable name can optionally end with :start or :end which is not considered part of the actual variable name
// expected pattern is like mustache templates, so we are looking for something like {{category}} or {{date:start}}
// anything that doesn't match our rule is ignored, so {{&foo!}} would simply be ignored
let match, re = /\{\{([A-Za-z0-9_]+?)\}\}/g;
let match, re = /\{\{\s*([A-Za-z0-9_]+?)\s*\}\}/g;
while ((match = re.exec(queryText)) != null) {
tags.push(match[1]);
}
Expand Down

0 comments on commit 417474b

Please sign in to comment.