Fix problem with parsing lists contain non-breaking spaces

Some of the time we need to treat non-breaking spaces as though they
are not spaces (regexps treat them as spaces by default).
This commit is contained in:
Jermolene
2014-05-06 18:10:27 +01:00
parent cc3d44aec1
commit 76e8640c31
2 changed files with 30 additions and 1 deletions
+1 -1
View File
@@ -266,7 +266,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)(?:\[\[(.*?)\]\])(?=\s|$)|(\S+)/mg,
var memberRegExp = /(?:^|[^\S\xA0])(?:\[\[(.*?)\]\])(?=[^\S\xA0]|$)|([\S\xA0]+)/mg,
results = [],
match;
do {