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

Preserve whitespace when loading a JSON file through a url querystring parameter #4543

Conversation

sangaline
Copy link
Contributor

When specifying a JSON file using a url querystring parameter, all whitespace is stripped from the file because the JSON is first parsed and then reserialized with JSON.stringify(content) if the content is not a Solidity compiler JSON-input-output file. If the purpose of the link is to open a human-readable JSON file in the editor, then removing the whitespace makes the file significantly less readable. This PR updates the logic to preserve the original formatting of the JSON file.

An example of the current behavior is opening a Sindri Manifest file in the editor.

Copy link

netlify bot commented Feb 17, 2024

👷 Deploy request for remixproject pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 4ef84e7

@Aniket-Engg Aniket-Engg requested a review from yann300 February 19, 2024 04:57
@yann300 yann300 enabled auto-merge February 19, 2024 08:59
@yann300
Copy link
Contributor

yann300 commented Feb 19, 2024

@sangaline could you please rebase it?

@yann300 yann300 disabled auto-merge February 20, 2024 12:58
@sangaline sangaline force-pushed the ews-preserve-whitespace-when-opening-json-files branch from bf894f2 to 4ef84e7 Compare February 22, 2024 14:58
@sangaline
Copy link
Contributor Author

@yann300 I just rebased it.

@yann300 yann300 merged commit 51a2ff5 into ethereum:master Feb 22, 2024
27 checks passed
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.

2 participants