not forcing doublequotes

This commit is contained in:
mic 2024-10-13 22:33:45 +02:00
parent 4b96ba99cf
commit ed596041ed

View file

@ -132,7 +132,7 @@ export const placeholdersUtils = {
// Regular expression to match patterns like {%...%}
return text.replace(/{%\s*(.*?)\s*%}/g, function(match, p1) {
// p1 contains the key inside {% %}
return replacements[p1] ? "\"" + replacements[p1] + "\"" : match; // Replace if found, otherwise keep the original
return replacements[p1] || match; // Replace if found, otherwise keep the original
});
},