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 formatting in partial documents #55

Merged
merged 2 commits into from
Sep 14, 2023
Merged

Conversation

iwahbe
Copy link
Owner

@iwahbe iwahbe commented Sep 9, 2023

This allows jsonian-format-region to correctly format JSON within a non-JSON context. For example:

This is some JSON: `[true, {"object": false}]`

By selecting only the region that contains the [ & ], we can apply formatting:

This is some JSON: `[
    true,
    {
        "object": false
    }
]`

@iwahbe iwahbe self-assigned this Sep 9, 2023
Base automatically changed from iwahbe/improve-formatting-speed to main September 9, 2023 23:10
@iwahbe iwahbe force-pushed the iwahbe/allow-partial-documents branch 2 times, most recently from 2949fe1 to a7cc37d Compare September 10, 2023 00:20
@iwahbe iwahbe force-pushed the iwahbe/allow-partial-documents branch from a7cc37d to d6270a2 Compare September 11, 2023 06:01
@iwahbe iwahbe merged commit 22bd5e2 into main Sep 14, 2023
2 checks passed
@iwahbe iwahbe deleted the iwahbe/allow-partial-documents branch September 14, 2023 01:16
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