Skip to content

fix: replace crlf line endings with lf - #2120

Merged
farnabaz merged 2 commits into
nuxt:mainfrom
nobkd:fix/line-break-hydration-mismatch
Jun 27, 2023
Merged

farnabaz merged 2 commits into
nuxt:mainfrom
nobkd:fix/line-break-hydration-mismatch

Conversation

@nobkd

@nobkd nobkd commented Jun 24, 2023 •

Copy link
Copy Markdown
Contributor

🔗 Linked issue

resolves #2000

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Replaces CRLF (or CR) line endings with LF to prevent a vue hydration mismatch
\r\n || \r => \n

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify

netlify Bot commented Jun 24, 2023 •

Copy link
Copy Markdown

@nobkd

nobkd commented Jun 25, 2023 •

Copy link
Copy Markdown
Contributor Author

Seems like content is of type object in a test with the file test/fixtures/basic/content/_partial/simple-json.json

Maybe the types hints of the functions should be updated? Or what is that test for?

@farnabaz

Copy link
Copy Markdown
Member

Thanks @nobkd
Indeed, we need to update types. unstorage's return value is not just string, it is null | string | number | boolean | object

This looks good to me, merging this and lets updates types in another PR

@farnabaz
farnabaz merged commit 2ac3616 into nuxt:main Jun 27, 2023
@nobkd
nobkd deleted the fix/line-break-hydration-mismatch branch June 27, 2023 12:37
@nobkd nobkd mentioned this pull request Jul 3, 2023
1 of 7 tasks
@farnabaz farnabaz mentioned this pull request Jul 18, 2023
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.

Hydration mismatch because of different "newline"

2 participants