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

Singleton subtag appearing twice is considered valid #23

Open
bitGatito opened this issue Jul 1, 2023 · 1 comment
Open

Singleton subtag appearing twice is considered valid #23

bitGatito opened this issue Jul 1, 2023 · 1 comment

Comments

@bitGatito
Copy link

This package does not treat the tag en-a-bbb-a-ccc as invalid even though the singleton subtag a appears twice.

According to the BCP 47 specifications: Each singleton subtag MUST appear at most one time in each tag (other than as a private use subtag). That is, singleton subtags MUST NOT be repeated. For example, the tag "en-a-bbb-a-ccc" is invalid because the subtag 'a' appears twice. Note that the tag "en-a-bbb-x-a-ccc" is valid because the second appearance of the singleton 'a' is in a private use sequence.

Is this an issue that needs to be fixed?

@wooorm
Copy link
Owner

wooorm commented Jul 1, 2023

Whether it needs to be fixed depends on how you want to fix it.

Probably depends on how others do it.

But a warning is probably a good idea at least

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

No branches or pull requests

2 participants