From 22b27f4251f3c402b336dbc5ca73daa144fade1f Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 7 Jun 2012 13:09:48 +0100 Subject: [PATCH] Ensured block macros parse their content as blocks, rather than a run --- core/modules/parsers/newwikitextparser/rules/macro.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/modules/parsers/newwikitextparser/rules/macro.js b/core/modules/parsers/newwikitextparser/rules/macro.js index 126ccc80a..464957945 100644 --- a/core/modules/parsers/newwikitextparser/rules/macro.js +++ b/core/modules/parsers/newwikitextparser/rules/macro.js @@ -35,7 +35,12 @@ exports.parse = function(match,isBlock) { if(match && match.index === this.pos) { this.pos = match.index + match[0].length; if(match[5]) { - content = this.parseRun(/(>>)/mg); + // If the macro has content then parse it as a block or run + if(isBlock) { + content = this.parseBlockTerminated(/(^>>$)/mg); + } else { + content = this.parseRun(/(>>)/mg); + } } var macroNode = $tw.Tree.Macro(match[1] || match[2],{ srcParams: match[3],