Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a check if substitutions exists #46945

Merged
merged 12 commits into from
Aug 19, 2024
Prev Previous commit
Next Next commit
Update testharness.js
  • Loading branch information
asamuzaK committed Jul 3, 2024
commit f5e84573fdf29602a797c0545d77cd5f67aff2bc
4 changes: 1 addition & 3 deletions resources/testharness.js
Original file line number Diff line number Diff line change
Expand Up @@ -4406,7 +4406,7 @@

function substitute_single(template, substitutions = {})
{
var substitution_re = /\$\{[^ }]*\}/g;
var substitution_re = /\$\{([^ }]*)\}/g;

function do_substitution(input)
{
Expand All @@ -4416,8 +4416,6 @@
rv.push(components[i]);
if (substitutions && components[i + 1]) {
rv.push(String(substitutions[components[i + 1]]));
} else {
break;
}
}
return rv;
Expand Down