Skip to content

Conversation

@kijeEnki
Copy link

[I think the title and the commit describe enough.]

@MDLC01
Copy link
Collaborator

MDLC01 commented Dec 27, 2025

If this is indeed the interface we want to provide to the end user, we may want to generate the variants automatically from a list of country codes instead of hardcoding them.

If instead we hardcode all codes like in this pull request, I wouldn't feel confident merging it unless we add a test that makes sure all flag.xy variants correspond to the right flag (i.e., the value of flag.xy is the sequence REGIONAL INDICATOR SYMBOL LETTER x + REGIONAL INDICATOR SYMBOL LETTER y).

@MDLC01 MDLC01 added the waiting on reviews Breaking and non-breaking changes need respectively 3 and 2 reviews label Dec 27, 2025
@kijeEnki
Copy link
Author

@MDLC01 i have generated the ascii codes by subtracting a value from regional indicators. i can assure you all of them are correct. checking those, however, might be a good idea

@T0mstone
Copy link
Collaborator

Having it explicitly in the module source and having a test that runs an automatic check is indeed the way it should be done, and already has precedence with the variation selectors.

@Enivex
Copy link
Collaborator

Enivex commented Dec 28, 2025

Something like \ri{x} meaning U+1F1FD : REGIONAL INDICATOR SYMBOL LETTER X ?

That way flag.us can be \ri{u} \ri{s}

@MDLC01
Copy link
Collaborator

MDLC01 commented Dec 28, 2025

This is also a possibility but it would be much more verbose, and still annoying to check manually. I think a test would be better.

@Enivex
Copy link
Collaborator

Enivex commented Dec 28, 2025

This is also a possibility but it would be much more verbose, and still annoying to check manually. I think a test would be better.

I was thinking both.

That being said, isn't there some crate we can use as a source of truth about valid regional sequences? To avoid having to hard code everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting on reviews Breaking and non-breaking changes need respectively 3 and 2 reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants