Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Ordering of Files in the Index #45

Closed
ImranR98 opened this issue Oct 20, 2021 · 2 comments · Fixed by #53
Closed

Inconsistent Ordering of Files in the Index #45

ImranR98 opened this issue Oct 20, 2021 · 2 comments · Fixed by #53

Comments

@ImranR98
Copy link

Zoottelkeeper orders files in the index in a way that is not consistent with Obsidian's own ordering, specifically when it comes to numbers.

This is how files are ordered in Obsidian's navigation tab:
image

But this is how the same folder is shown in Zoottelkeeper's index:
image

Obsidian recognizes that 9 < 10, but Zoottelkeeper thinks 10 should be right after 1 as that is technically right if you're just thinking about alphabetical ordering.

Is this intended behaviour? I think it would make more sense to go with Obsidian's default approach.

@seanjun21
Copy link

I noticed very similar behavior when using dataview (plugin) to sort metadata.

  • For instance, if I have a dataset that's 1, 200, 15, 3, it will basically sort in 1-15-200-3 order.

I had to make sure to convert fields into numbers using the number() function.
I'm sure within this plugin, we can do something similar.

@akosbalasko
Copy link
Owner

HI @seanjun21@ImranR98 ,
Thanks for reporting this issue, the order you get is called lexicographical which results a bit different order in case of numbers. But I see it is a problem, so I fix it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants