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

Allow installation names including "." character #119

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

jlegrone
Copy link
Member

@jlegrone jlegrone commented Sep 4, 2019

From the docs:

Installation names MUST consist of Graph Unicode characters and MAY be user-readable. The Unicode Graphic characters include letters, marks, numbers, punctuation, symbols, and spaces, from categories L, M, N, P, S, Zs.

This PR doesn't quite bring cnab-go up to spec, but does enable the use of installation names which include the . character (this supports our internal installation naming convention). If someone would like to school me in regex we can update this PR to be fully spec compliant. 😄

for name, expect := range map[string]bool{
"M4cb3th": true,
"Lady MacBeth": false, //spaces illegal
"Lady MacBeth": false, // spaces illegal
"3_Witches": true,
"Banquø": false, // We could probably loosen this one up
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated to this PR, but ø is part of L and here it isn't approved. Group S is spacing and is also approved. In fact, the only group that seems to not be allowed here is C so none of the tests here should fail. Am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

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

On that note, my understanding is that, if you are using regex (and thus re2) you can get away using unicode character classes explicitly and probably get away with [\pL\pM\pN\pP\pS\pZ]* or so...

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll open a new issue for this, thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

See #126

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

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

LGTM

@jlegrone jlegrone merged commit fae945b into cnabio:master Sep 17, 2019
@jlegrone jlegrone deleted the jlegrone/validate-claim-names branch September 17, 2019 16:19
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.

None yet

4 participants