mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: bbcode regex was greedy and preventing quotes
This commit is contained in:
@@ -11,7 +11,7 @@ function trailingSpaceOnly(src, start, max) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const ATTR_REGEX = /^\s*=(.+)$|((([a-z0-9]*)\s*)=)(["“”'].*["“”']|\S+)/ig;
|
||||
const ATTR_REGEX = /^\s*=(.+)$|((([a-z0-9]*)\s*)=)(["“”'].*?["“”']|\S+)/ig;
|
||||
|
||||
// parse a tag [test a=1 b=2] to a data structure
|
||||
// {tag: "test", attrs={a: "1", b: "2"}
|
||||
|
||||
Reference in New Issue
Block a user