mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-02 14:58:06 +00:00
* $tw.utils.stringifyList will wrap tiddlers starting with `+-~=` in brackets.
This commit is contained in:
committed by
Jeremy Ruston
parent
fada96651e
commit
67066fe86e
10
boot/boot.js
10
boot/boot.js
@@ -314,13 +314,13 @@ $tw.utils.parseDate = function(value) {
|
||||
// Stringify an array of tiddler titles into a list string
|
||||
$tw.utils.stringifyList = function(value) {
|
||||
if($tw.utils.isArray(value)) {
|
||||
var result = [];
|
||||
for(var t=0; t<value.length; t++) {
|
||||
var result = new Array(value.length);
|
||||
for(var t=0, l=value.length; t<l; t++) {
|
||||
var entry = value[t] || "";
|
||||
if(entry.indexOf(" ") !== -1) {
|
||||
result.push("[[" + entry + "]]");
|
||||
if(entry.indexOf(" ") !== -1 || "+-~=".indexOf(entry[0]) !== -1) {
|
||||
result[t] = "[[" + entry + "]]";
|
||||
} else {
|
||||
result.push(entry);
|
||||
result[t] = entry;
|
||||
}
|
||||
}
|
||||
return result.join(" ");
|
||||
|
||||
Reference in New Issue
Block a user