Skip to content

Node.js based forum software built for the modern web

closes #556, also removes the newline that was previously inserted

psychobunnye98d05b1a591
diff --git a/public/src/templates.js b/public/src/templates.js
index 1be825e469..44083d1589 100644
--- a/public/src/templates.js
+++ b/public/src/templates.js
@@ -248,9 +248,12 @@
if (self.blocks && block !== undefined) self.blocks[block] = data[0];
+ var begin = new RegExp("(\r\n)*<!-- BEGIN " + block + " -->(\r\n)*", "g"),
+ end = new RegExp("(\r\n)*<!-- END " + block + " -->(\r\n)*", "g"),
+
data = data[0]
- .replace("<!--[\\s]*BEGIN " + block + "[\\s]*-->", "")
- .replace("<!--[\\s]*END " + block + "[\\s]*-->", "");
+ .replace(begin, "")
+ .replace(end, "");
return data;
}