mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:57:25 +08:00
FIX: bbcode regex was greedy and preventing quotes
This commit is contained in:
11
test/javascripts/lib/bbcode-test.js.es6
Normal file
11
test/javascripts/lib/bbcode-test.js.es6
Normal file
@ -0,0 +1,11 @@
|
||||
import { parseBBCodeTag } from 'pretty-text/engines/discourse-markdown/bbcode-block';
|
||||
|
||||
QUnit.module("lib:pretty-text:bbcode");
|
||||
|
||||
QUnit.test("block with multiple quoted attributes", assert => {
|
||||
const parsed = parseBBCodeTag('[test one="foo" two="bar bar"]', 0, 30);
|
||||
|
||||
assert.equal(parsed.tag, "test");
|
||||
assert.equal(parsed.attrs.one, "foo");
|
||||
assert.equal(parsed.attrs.two, "bar bar");
|
||||
});
|
Reference in New Issue
Block a user