mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 19:47:20 +00:00
Improve handling of double square brackets within tags
Now a [[ has to be preceded by the beginning of the string or a whitespace and a ]] has to be followed by whitespace or the end of the string to act as quotes. Thanks to @Skeeve for the regex
This commit is contained in:
parent
1b2a5fe130
commit
810167bc7b
@ -269,7 +269,7 @@ $tw.utils.stringifyList = function(value) {
|
|||||||
// Parse a string array from a bracketted list. For example "OneTiddler [[Another Tiddler]] LastOne"
|
// Parse a string array from a bracketted list. For example "OneTiddler [[Another Tiddler]] LastOne"
|
||||||
$tw.utils.parseStringArray = function(value) {
|
$tw.utils.parseStringArray = function(value) {
|
||||||
if(typeof value === "string") {
|
if(typeof value === "string") {
|
||||||
var memberRegExp = /(?:\[\[([^\]]+)\]\])|([^\s]+)/mg,
|
var memberRegExp = /(?:^|\s)(?:\[\[(.*?)\]\])(?=\s|$)|(\S+)/mg,
|
||||||
results = [],
|
results = [],
|
||||||
match;
|
match;
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user