mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 15:42:59 +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:
		| @@ -141,6 +141,15 @@ exports.operators = { | ||||
| 			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": { | ||||
| 		selector: function(operator) { | ||||
| 			throw "Cannot use limit operator at the start of a filter operation"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston