Skip to content

Commit

Permalink
Merge pull request #90 from grafana/fix/better-variable-avoidance
Browse files Browse the repository at this point in the history
[fix] Extend variable RegExp (still pretty lose, but not uber lose)
  • Loading branch information
w1kman authored Nov 17, 2021
2 parents 94b40db + ed6b447 commit a8c3510
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ const lineBreak = /\n/
const lineComment = /^\/\//
const multilineComment = /^\/\*/
const multilineCommentEnds = /\*\//g
const variable = /\${([^}]*)}/
const variables = /\${([^}]*)}/g
const variableStart = /^\${([^}]*)}/
const variable = /\${([^}\r\n\t\f\v]*)}/
const variables = /\${([^}\r\n\t\f\v]*)}/g
const variableStart = /^\${([^}\r\n\t\f\v]*)}/

module.exports = {
absoluteUrl,
Expand Down
32 changes: 32 additions & 0 deletions test/e2e/pass/better-variable-avoidance.har

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions test/e2e/pass/better-variable-avoidance.js

Large diffs are not rendered by default.

0 comments on commit a8c3510

Please sign in to comment.