FIX: BBCode with params couldn't span lines
This commit is contained in:
parent
f422e5c8c4
commit
104b39540a
|
@ -47,7 +47,7 @@ function replaceBBCodeParamsRaw(tag, emitter) {
|
|||
stop: "[/" + tag + "]",
|
||||
rawContents: true,
|
||||
emitter: function(contents) {
|
||||
var regexp = /^([^\]]+)\](.*)$/,
|
||||
var regexp = /^([^\]]+)\]([\S\s]*)$/,
|
||||
m = regexp.exec(contents);
|
||||
|
||||
if (m) { return emitter.call(this, m[1], m[2]); }
|
||||
|
|
|
@ -62,6 +62,9 @@ test("size tags", function() {
|
|||
format("[size=asdf]regular[/size]",
|
||||
"<span class=\"bbcode-size-1\">regular</span>",
|
||||
"it only supports numbers in bbcode");
|
||||
format("[size=35]\nNEWLINE\n[/size]",
|
||||
"<span class=\"bbcode-size-35\"><br>NEWLINE<br></span>",
|
||||
"works with newlines");
|
||||
});
|
||||
|
||||
test("quotes", function() {
|
||||
|
|
Loading…
Reference in New Issue