Skip to content

Conversation

@episerver-edvin-dackelid
Copy link
Contributor

@episerver-edvin-dackelid episerver-edvin-dackelid commented Mar 18, 2025

Fix: Ensure new lines are stripped on both Windows (\r\n) and Linux (\n) so that bulk content is consistently formatted across all platforms.

Changes

  • Change SaveContentAsync() to send minified JSON. That solves the issue with line brakes for Linux
  • Added tests for number of line endings and minified JSON
  • Update old tests to expect minified JSON instead of semi-pretty JSON
  • Added a VSCode settings file to make it easier to run tests from VSCode using the extension dotnet-test-explorer

@episerver-edvin-dackelid
Copy link
Contributor Author

I made a few updates to this code, adding tests and minifying the JSON request instead of generating pretty JSON and then stripping line endings. Please review again

@episerver-edvin-dackelid episerver-edvin-dackelid merged commit 150a18d into main Mar 20, 2025
1 check 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.

7 participants