mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-18 03:31:03 +01:00
fixed a bug running multiple blocks in one template on an empty array
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user