Tighten parameter substitution tolerance

In collection templating syntax, do not tolerate whitespace after dollar sign. So while `{{ $param }}` is valid `{{ $ param }}` will be ignored.
This commit is contained in:
undergroundwires
2021-08-30 18:57:05 +01:00
parent c0c475ff56
commit dcccb61781
2 changed files with 6 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
import { RegexParser, IPrimitiveExpression } from '../Parser/RegexParser';
export class ParameterSubstitutionParser extends RegexParser {
protected readonly regex = /{{\s*\$\s*([^}| ]+)\s*}}/g;
protected readonly regex = /{{\s*\$([^}| ]+)\s*}}/g;
protected buildExpression(match: RegExpMatchArray): IPrimitiveExpression {
const parameterName = match[1];
return {