mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-23 06:20:01 +00:00
Add wiki.countTiddlers() method
This commit is contained in:
parent
7e46565182
commit
6f88a57a41
@ -207,6 +207,11 @@ exports.getTiddlers = function(sortField,excludeTag) {
|
|||||||
return titles;
|
return titles;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.countTiddlers = function(excludeTag) {
|
||||||
|
var tiddlers = this.getTiddlers(null,excludeTag);
|
||||||
|
return $tw.utils.count(tiddlers);
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Sort an array of tiddler titles by a specified field
|
Sort an array of tiddler titles by a specified field
|
||||||
titles: array of titles (sorted in place)
|
titles: array of titles (sorted in place)
|
||||||
@ -282,7 +287,7 @@ exports.getTiddlerLinks = function(title) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if(parser) {
|
if(parser) {
|
||||||
checkParseTree(parser.tree)
|
checkParseTree(parser.tree);
|
||||||
}
|
}
|
||||||
return links;
|
return links;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user