mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
closes #556, also removes the newline that was previously inserted
This commit is contained in:
@@ -248,9 +248,12 @@
|
|||||||
|
|
||||||
if (self.blocks && block !== undefined) self.blocks[block] = data[0];
|
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]
|
data = data[0]
|
||||||
.replace("<!--[\\s]*BEGIN " + block + "[\\s]*-->", "")
|
.replace(begin, "")
|
||||||
.replace("<!--[\\s]*END " + block + "[\\s]*-->", "");
|
.replace(end, "");
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user