mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-09 23:50:01 +00:00
Added a case insensitive sort to the filters
Hoping to come up with a better syntax for this
This commit is contained in:
parent
513fa6f756
commit
acad64a933
@ -141,6 +141,15 @@ exports.operators = {
|
|||||||
return "this.sortTiddlers(subResults,\"" + $tw.utils.stringify(operator.operand) + "\"," + desc + ");";
|
return "this.sortTiddlers(subResults,\"" + $tw.utils.stringify(operator.operand) + "\"," + desc + ");";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"sort-case-sensitive": {
|
||||||
|
selector: function(operator) {
|
||||||
|
throw "Cannot use sort operator at the start of a filter operation";
|
||||||
|
},
|
||||||
|
filter: function(operator) {
|
||||||
|
var desc = operator.prefix === "!" ? "true" : "false";
|
||||||
|
return "this.sortTiddlers(subResults,\"" + $tw.utils.stringify(operator.operand) + "\"," + desc + ",true);";
|
||||||
|
}
|
||||||
|
},
|
||||||
"limit": {
|
"limit": {
|
||||||
selector: function(operator) {
|
selector: function(operator) {
|
||||||
throw "Cannot use limit operator at the start of a filter operation";
|
throw "Cannot use limit operator at the start of a filter operation";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user