fixed a bug running multiple blocks in one template on an empty array

This commit is contained in:
psychobunny
2014-02-21 16:46:58 -05:00
parent 32ac3d94d2
commit 6f7243f42f

View File

@@ -281,7 +281,7 @@
}
function makeRegex(block) {
return new RegExp("<!--[\\s]*BEGIN " + block + "[\\s]*-->[\\s\\S]*<!--[\\s]*END " + block + "[\\s]*-->", 'g');
return new RegExp("<!--[\\s]*BEGIN " + block + "[\\s]*-->([\\s\\S]*?)<!--[\\s]*END " + block + "[\\s]*-->", 'g');
}
function makeConditionalRegex(block) {