mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-05-02 08:54:02 -04:00
FIX: BBCode with params couldn't span lines
This commit is contained in:
parent
f422e5c8c4
commit
104b39540a
2 changed files with 4 additions and 1 deletions
|
@ -47,7 +47,7 @@ function replaceBBCodeParamsRaw(tag, emitter) {
|
||||||
stop: "[/" + tag + "]",
|
stop: "[/" + tag + "]",
|
||||||
rawContents: true,
|
rawContents: true,
|
||||||
emitter: function(contents) {
|
emitter: function(contents) {
|
||||||
var regexp = /^([^\]]+)\](.*)$/,
|
var regexp = /^([^\]]+)\]([\S\s]*)$/,
|
||||||
m = regexp.exec(contents);
|
m = regexp.exec(contents);
|
||||||
|
|
||||||
if (m) { return emitter.call(this, m[1], m[2]); }
|
if (m) { return emitter.call(this, m[1], m[2]); }
|
||||||
|
|
|
@ -62,6 +62,9 @@ test("size tags", function() {
|
||||||
format("[size=asdf]regular[/size]",
|
format("[size=asdf]regular[/size]",
|
||||||
"<span class=\"bbcode-size-1\">regular</span>",
|
"<span class=\"bbcode-size-1\">regular</span>",
|
||||||
"it only supports numbers in bbcode");
|
"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() {
|
test("quotes", function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue