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

Feature request: Save snippets with indented/pretty printed JSON #212

Open
dhendry opened this issue Jun 25, 2021 · 0 comments
Open

Feature request: Save snippets with indented/pretty printed JSON #212

dhendry opened this issue Jun 25, 2021 · 0 comments

Comments

@dhendry
Copy link

dhendry commented Jun 25, 2021

Is your feature request related to a problem? Please describe.

Snippet JSON files are serialized as a single line which makes them nearly impossible to manage via source control. When using tools like git any change results in an unusable diff since it appears 'everything' has changed and its difficult or impossible to manage conflicts

Describe the solution you'd like

When saving snippet json files to disk (or exporting), export them with indents.

I believe this is as simple as changing JSON.stringify(snippet) to JSON.stringify(snippet, null, 4) although I have not had a chance to test it:

https://github.com/jupytercalpoly/jupyterlab-code-snippets/search?q=JSON.stringify

image

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

1 participant