-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
feat: Allow enum options to be newline delimited only #205
Conversation
Fixes: amannn#204 Signed-off-by: Jesse Szwedko <[email protected]>
Thank you for your PR! I see your point and I'd be open to require newlines generally (not configurable). Would you want to change this PR according to this and make sure the docs point the user towards that? It will be a new major version then. |
Signed-off-by: Jesse Szwedko <[email protected]>
Thanks for the feedback @amannn ! I pushed another commit that removes the backwards compatibility and requires lists to be newline delimited. Let me know what you think. |
@@ -1,4 +1,4 @@ | |||
const ENUM_SPLIT_REGEX = /[,\s]\s*/; | |||
const ENUM_SPLIT_REGEX = /\n/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to support \r
here too? https://stackoverflow.com/questions/1761051/difference-between-n-and-r
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes sense since \r
, by itself, is just a carriage return rather than a newline. For Windows file editing, it'd typically have \r\n
which would still be split, and then subsequently trimmed, correctly. I'll push a change to add \r\n
to the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds fair, thank you for your feedback!
Signed-off-by: Jesse Szwedko <[email protected]>
Thanks for the feedback @amannn ! I push a few more changes. |
🎉 This PR is included in version 5.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This change did break our workflows because we have the following steps in github actions:
We had been completing step 1 using a bash array and using Below is how we are now implementing this in case anyone is in a similar situation.
This solution was largely based on github/docs#21529. |
Fixes: #204
Signed-off-by: Jesse Szwedko [email protected]