1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-14 06:17:20 +00:00

Added present-but-empty list-after functionality (#3219)

This places the list item at the end of the list when its 'list-item' field
is an empty string.
This commit is contained in:
Cameron Fischer
2018-04-24 11:58:09 -04:00
committed by Jeremy Ruston
parent 7f1541464a
commit 7e58866499
2 changed files with 3 additions and 1 deletions

View File

@@ -569,6 +569,8 @@ exports.sortByList = function(array,listTitle) {
afterTitle = tiddler.fields["list-after"];
if(beforeTitle === "") {
newPos = 0;
} else if(afterTitle === "") {
newPos = titles.length;
} else if(beforeTitle) {
newPos = titles.indexOf(beforeTitle);
} else if(afterTitle) {