Skip to content

Node.js based forum software built for the modern web

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

psychobunny6f7243f42f35
diff --git a/public/src/templates.js b/public/src/templates.js
index e4dbb0f69a..0018b1e974 100644
--- a/public/src/templates.js
+++ b/public/src/templates.js
@@ -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) {