2 * @fileoverview Interpolate keys from an object into a string with {{ }} markers.
8 //------------------------------------------------------------------------------
10 //------------------------------------------------------------------------------
12 module.exports = (text, data) => {
17 // Substitution content for any {{ }} markers.
18 return text.replace(/\{\{([^{}]+?)\}\}/gu, (fullMatch, termWithWhitespace) => {
19 const term = termWithWhitespace.trim();
25 // Preserve old behavior: If parameter name not provided, don't replace it.