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

Non-Semver should be recognized if no "--separator" is provided #27

Closed
koppor opened this issue Nov 14, 2023 · 2 comments
Closed

Non-Semver should be recognized if no "--separator" is provided #27

koppor opened this issue Nov 14, 2023 · 2 comments

Comments

@koppor
Copy link
Contributor

koppor commented Nov 14, 2023

Follow-up to #22. Minor issue.

clparse --format=json --separator=–

works great

clparse --format=json

always outputs null as version.

I wonder whether it was possible that version is non-null, but date is null (because the separator is not known)

This might be too complex. Feel free to close the issue. My usecase works with --separator=–. Just wanted to share some ideas for "know-less" tooling :).

@marcaddeo
Copy link
Owner

Hi @koppor, this is happening because in order to parse the release information from the header I'm first splitting by the separator, i.e. . Then the left and right hand sides are parsed as the version and the date.

Without knowing the correct separator at runtime, it does not attempt to parse the heading.

I'm not sure there's much reason to try and implement some sort of "separator guessing" here, or to potentially parse it differently.

@marcaddeo
Copy link
Owner

I guess it could just be a regular expression to match the separator, but again not sure if it's worth doing.

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