From 9274651bfd37e0ece645e6f9c159beae880e85a7 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 9 Jun 2012 15:08:30 +0100 Subject: [PATCH] Parse HTML tag contents as a block if it is a block tag --- core/modules/parsers/newwikitextparser/rules/html.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/modules/parsers/newwikitextparser/rules/html.js b/core/modules/parsers/newwikitextparser/rules/html.js index 723ad0bff..88e14aeb9 100644 --- a/core/modules/parsers/newwikitextparser/rules/html.js +++ b/core/modules/parsers/newwikitextparser/rules/html.js @@ -50,7 +50,13 @@ exports.parse = function(match,isBlock) { } this.pos = startMatch.index + startMatch[0].length; var reEnd = new RegExp("()","mg"), - element = $tw.Tree.Element(startMatch[1],attributes,this.parseRun(reEnd)); + content; + if(isBlock) { + content = this.parseBlockTerminated(reEnd); + } else { + content = this.parseRun(reEnd); + } + var element = $tw.Tree.Element(startMatch[1],attributes,content); reEnd.lastIndex = this.pos; match = reEnd.exec(this.source); if(match && match.index === this.pos) {