mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-01-30 04:11:32 -08:00
Add locale support for sort filter run prefix
This commit is contained in:
parent
4a617188fc
commit
9479a156d7
1 changed files with 2 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ exports.sort = function(operationSubFunction,options) {
|
|||
sortKeys = [],
|
||||
indexes = new Array(inputTitles.length),
|
||||
compareFn;
|
||||
const locale = $tw.utils.checkLanguageCode(suffixes[2] && suffixes[2][0] ? suffixes[2][0] : "") ? suffixes[2][0] : undefined;
|
||||
results.each(function(title) {
|
||||
var key = operationSubFunction(options.wiki.makeTiddlerIterator([title]),widget.makeFakeWidgetWithVariables({
|
||||
"currentTiddler": "" + title,
|
||||
|
|
@ -34,7 +35,7 @@ exports.sort = function(operationSubFunction,options) {
|
|||
indexes[t] = t;
|
||||
}
|
||||
// Sort the indexes
|
||||
compareFn = $tw.utils.makeCompareFunction(sortType,{defaultType: "string", invert:invert, isCaseSensitive:isCaseSensitive});
|
||||
compareFn = $tw.utils.makeCompareFunction(sortType,{defaultType: "string", invert:invert, isCaseSensitive:isCaseSensitive,locale:locale});
|
||||
indexes = indexes.sort(function(a,b) {
|
||||
return compareFn(sortKeys[a],sortKeys[b]);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue