diff --git a/lib/template.js b/lib/template.js index c857415..1aeafa8 100644 --- a/lib/template.js +++ b/lib/template.js @@ -93,8 +93,8 @@ const renderRecursively = (inputJson, template, execOptions = {}) => { if (typeof template === 'object' && template !== null) { return Object.fromEntries( Object.entries(template).flatMap(([key, value]) => { - const TEMP_SPREAD_KEYWORD_ESCAPED = "tempSpreadKeyword\\(\\)"; - const keywordMatcher = `^\\{\\{\\s*${TEMP_SPREAD_KEYWORD_ESCAPED}\\s*\\}\\}$`; + const SPREAD_KEYWORD = "tempSpreadKeyword"; + const keywordMatcher = `^\\{\\{\\s*${SPREAD_KEYWORD}\\(\s*\\)\\s*\\}\\}$`; // matches {{ () }} with white spaces where you'd expect them if (key.match(keywordMatcher)) { const evaluatedValue = renderRecursively(inputJson, value, execOptions);