mirror of
https://gitee.com/mafgwo/stackedit
synced 2024-11-16 11:42:23 +08:00
Use natural sorting for explore nodes
This commit is contained in:
parent
91f8cf3c10
commit
835ef7f5bc
|
@ -14,7 +14,7 @@ function debounceAction(action, wait) {
|
|||
};
|
||||
}
|
||||
|
||||
const collator = new Intl.Collator(undefined, { sensitivity: 'base' });
|
||||
const collator = new Intl.Collator(undefined, { sensitivity: 'base', numeric: true });
|
||||
const compare = (node1, node2) => collator.compare(node1.item.name, node2.item.name);
|
||||
|
||||
class Node {
|
||||
|
|
Loading…
Reference in New Issue
Block a user