FIX: BBCode blocks parser no longer mangles JsonML arrays
This commit is contained in:
parent
d97548114f
commit
9cca64cf69
|
@ -55,7 +55,7 @@ Discourse.BBCode.register = function(codeName, args, emitter) {
|
|||
}
|
||||
});
|
||||
}
|
||||
if (!args.singlePara && contents.length === 1) {
|
||||
if (!args.singlePara && contents.length === 1 && contents[0] instanceof Array && contents[0][0] === "para") {
|
||||
contents[0].shift();
|
||||
contents = contents[0];
|
||||
}
|
||||
|
|
|
@ -65,6 +65,9 @@ test("size tags", function() {
|
|||
format("[size=35]NEWLINE\n\ntest[/size]",
|
||||
"<span class=\"bbcode-size-35\"><p>NEWLINE</p><p>test</p></span>",
|
||||
"works with newlines");
|
||||
format("[size=35][quote=\"user\"]quote[/quote][/size]",
|
||||
"<span class=\"bbcode-size-35\"><aside class=\"quote\"><div class=\"title\"><div class=\"quote-controls\"></div>user:</div><blockquote><p>quote</p></blockquote></aside></span>",
|
||||
"works with nested complex blocks");
|
||||
});
|
||||
|
||||
test("quotes", function() {
|
||||
|
|
Loading…
Reference in New Issue