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

feat(json): add abliity to remove trailing commas while stripping comments #613

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

mehalter
Copy link
Contributor

@mehalter mehalter commented Aug 1, 2024

This adds an additional feature to the json_strip_comments function that adds more compatibility for converting a JSON string to something compatible with vim.fn.json_decode. I also added tests to make sure things like commas in strings are fully ignored and that it doesn't mess up the already existing comment stripping.

Resolves #612

@mehalter
Copy link
Contributor Author

@Conni2461 sorry for the noise! I just wanted to check in and see if there was any way that this PR could get reviewed :)

@Conni2461
Copy link
Collaborator

thanks :)

@Conni2461 Conni2461 merged commit 2d9b061 into nvim-lua:master Sep 17, 2024
7 checks passed
@mehalter mehalter deleted the json_trailing_commas branch September 17, 2024 19:53
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.

Can we have in json_strip_comments() additional functionallity that removes trailing commas?
2 participants