1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Revert obsolete changes to boot.js

This commit is contained in:
jeremy@jermolene.com 2022-09-02 20:03:33 +01:00
parent f0fa1af3a8
commit 2f494ba152

View File

@ -375,7 +375,7 @@ $tw.utils.stringifyList = function(value) {
var result = new Array(value.length);
for(var t=0, l=value.length; t<l; t++) {
var entry = value[t] || "";
if(entry === "" || /[^\S\xA0]/.test(entry)) {
if(entry.indexOf(" ") !== -1) {
result[t] = "[[" + entry + "]]";
} else {
result[t] = entry;
@ -390,13 +390,13 @@ $tw.utils.stringifyList = function(value) {
// Parse a string array from a bracketted list. For example "OneTiddler [[Another Tiddler]] LastOne"
$tw.utils.parseStringArray = function(value, allowDuplicate) {
if(typeof value === "string") {
var memberRegExp = /(?:^|[^\S\xA0])(?:\[\[([\s\S]*?)\]\])(?=[^\S\xA0]|$)|([\S\xA0]+)/mg,
var memberRegExp = /(?:^|[^\S\xA0])(?:\[\[(.*?)\]\])(?=[^\S\xA0]|$)|([\S\xA0]+)/mg,
results = [], names = {},
match;
do {
match = memberRegExp.exec(value);
if(match) {
var item = match[1] !== undefined ? match[1] : match[2];
var item = match[1] || match[2];
if(item !== undefined && (!$tw.utils.hop(names,item) || allowDuplicate)) {
results.push(item);
names[item] = true;
@ -2675,4 +2675,4 @@ if(typeof(exports) !== "undefined") {
} else {
_boot(window.$tw);
}
//# sourceURL=$:/boot/boot.js
//# sourceURL=$:/boot/boot.js