aboutsummaryrefslogtreecommitdiff
path: root/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 2f5a4866..2a0df8c5 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -143,8 +143,9 @@ function push_uniq(array, el) {
}
function string_template(text, props) {
- return text.replace(/\{(.+?)\}/g, function(str, p) {
- return props && props[p];
+ return text.replace(/\{([^}]+)\}/g, function(str, p) {
+ var value = props[p];
+ return value instanceof AST_Node ? value.print_to_string() : value;
});
}