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

Fix asset code sorting with mixed cases #606

Merged
merged 5 commits into from
May 12, 2023
Merged

Conversation

paulbellamy
Copy link
Contributor

Fixes #593

Based on #605, but because what we want is ascii byte comparison. We can use Buffer.compare to do that for us.

silence48 and others added 4 commits May 10, 2023 15:07
I update the asciicompare function to properly sort upper case letters before lower case regardless of their position of the alphabet.
each is a string not a number, but we need a number to properly compare the length so we set a variable called letter pos using parseInt(each)
src/asset.js Outdated Show resolved Hide resolved
@Shaptic
Copy link
Contributor

Shaptic commented May 11, 2023

Add a changelog entry plox

@silence48
Copy link
Contributor

a more elegant solution, didn't think of this.

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 this pull request may close these issues.

Lexicographical sorting is not in pair with what the network expects
5 participants