Skip to content

Allow trailing comma without trailing whitespace#144

Open
chrysn wants to merge 2 commits intoNullus157:mainfrom
chrysn-pull-requests:allow_trailing_comman
Open

Allow trailing comma without trailing whitespace#144
chrysn wants to merge 2 commits intoNullus157:mainfrom
chrysn-pull-requests:allow_trailing_comman

Conversation

@chrysn
Copy link
Contributor

@chrysn chrysn commented Jun 1, 2024

There were cases when a trailing comma (that is mostly allowed by this implementation, also by the upcoming spec, for but not tested) was not allowed:

$ echo '[1,2,3,]' | cargo run -- --from diag --to diag
Error: Failed all parsers

This patch fixes this by allowing the white space after the comma to be absent. I'm not sure that covers all the cases that were missing, but at least it covers a file I was using.

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.

1 participant