timing out reset codes, enhancing template replace so that a single placeholder can be used multiple times

This commit is contained in:
Julian Lam
2013-04-23 21:13:01 -04:00
parent dea9a707dc
commit 5369be0397
5 changed files with 89 additions and 53 deletions

View File

@@ -29,7 +29,8 @@ var fs = require('fs');
var parse = function(data) {
function replace(key, value, template) {
return template.replace("{" + key + "}", value);
var searchRegex = new RegExp('{' + key + '}', 'g');
return template.replace(searchRegex, value);
}
function makeRegex(block) {