From 810167bc7b6dc5b7a1077525ef332e3c603bfd48 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 17 Dec 2013 14:53:02 +0000 Subject: [PATCH] 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 --- boot/boot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/boot.js b/boot/boot.js index fad5a6ca6..039874ea0 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -269,7 +269,7 @@ $tw.utils.stringifyList = function(value) { // Parse a string array from a bracketted list. For example "OneTiddler [[Another Tiddler]] LastOne" $tw.utils.parseStringArray = function(value) { if(typeof value === "string") { - var memberRegExp = /(?:\[\[([^\]]+)\]\])|([^\s]+)/mg, + var memberRegExp = /(?:^|\s)(?:\[\[(.*?)\]\])(?=\s|$)|(\S+)/mg, results = [], match; do {