Skip to content

Fix asset code sorting with mixed cases - #606

Merged
paulbellamy merged 5 commits into
masterfrom
593/asset-sorting
May 12, 2023
Merged

paulbellamy merged 5 commits into
masterfrom
593/asset-sorting

Conversation

@paulbellamy

Copy link
Copy Markdown
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)
Comment thread src/asset.js Resolved
@Shaptic

Shaptic commented May 11, 2023

Copy link
Copy Markdown
Contributor

Add a changelog entry plox

@silence48

Copy link
Copy Markdown
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