diff --git a/lib/util/interpolate.js b/lib/util/interpolate.js index e0f2d027d19..cefdcca5454 100644 --- a/lib/util/interpolate.js +++ b/lib/util/interpolate.js @@ -13,7 +13,11 @@ module.exports = (text, data) => { if (!data) { return text; } - return text.replace(/\{\{\s*([^{}]+?)\s*\}\}/g, (fullMatch, term) => { + + // Substitution content for any {{ }} markers. + return text.replace(/\{\{([^{}]+?)\}\}/g, (fullMatch, termWithWhitespace) => { + const term = termWithWhitespace.trim(); + if (term in data) { return data[term]; }