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

Make unicode blocks ordered #30

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Make unicode blocks ordered #30

merged 2 commits into from
Nov 29, 2024

Conversation

faern
Copy link
Member

@faern faern commented Nov 29, 2024

I realized that --print-unicode-blocks printed all unicode blocks in a seemingly random order. Because the phf maps are not ordered! But that was an easy fix, since the same crate provides an ordered map type as well!

I also realized the verbose printing, including the unicode range, was hard to read. since all the block names are of different length. So I changed it so the range is printed first. So instead of this:

Hangul Jamo: U+1100..U+11FF
Ethiopic: U+1200..U+137F
Ethiopic Supplement: U+1380..U+139F
Cherokee: U+13A0..U+13FF

We instead get this:

U+1100..U+11FF: Hangul Jamo
U+1200..U+137F: Ethiopic
U+1380..U+139F: Ethiopic Supplement
U+13A0..U+13FF: Cherokee

Which I think is way simpler to visually parse.

This makes --print-unicode-blocks list all blocks in the expected order
instead of a random order
@faern faern force-pushed the make-unicode-blocks-ordered branch from 49740e2 to 9a57117 Compare November 29, 2024 09:37
Copy link
Member

@gregoire-mullvad gregoire-mullvad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@faern faern merged commit 4d29ed7 into main Nov 29, 2024
12 checks passed
@faern faern deleted the make-unicode-blocks-ordered branch November 29, 2024 10:39
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.

2 participants