Skip to content

Fixes hydration issue caused by #3793 - #3797

Closed
PH4NTOMiki wants to merge 1 commit into
sveltejs:masterfrom
PH4NTOMiki:quick-fix-docs-hydrate
Closed

PH4NTOMiki wants to merge 1 commit into
sveltejs:masterfrom
PH4NTOMiki:quick-fix-docs-hydrate

Conversation

@PH4NTOMiki

Copy link
Copy Markdown
Contributor

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.
    Should fix issue cause by PR fixes shadow hydration escaping #3793

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot

changeset-bot Bot commented Feb 9, 2022

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: de2d3ee

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@PH4NTOMiki

Copy link
Copy Markdown
Contributor Author

@benmccann can you just check somehow does this work or not, because I can't run Docs site locally to test it,
so sorry for the trouble caused

@benmccann

Copy link
Copy Markdown
Member

thank you. this works. I've updated it up in a new PR: #3798

@benmccann benmccann closed this Feb 9, 2022
@dominikg

dominikg commented Feb 9, 2022

Copy link
Copy Markdown
Contributor

thank you so much for keeping tabs on this!

minor thing that should not prevent this PR from moving forward if this acually fixes it (which would indicate that the other escape fuction escapes too much)

				const escaped_shadow_props = s(shadow_props).replace(
					/[&><\u2028\u2029]/g,
					(match) => escape_lookup[match]
				);

using multiple .replace(/char/g,replacement).replace... might be faster. than a replacer function.

@PH4NTOMiki
PH4NTOMiki deleted the quick-fix-docs-hydrate branch March 4, 2022 15:24

This branch was successfully deployed

2 active deployments
Preview – kit de2d3ee7 Deployed Feb 9, 2022 by vercel[bot]
Preview – kit-svelte-dev de2d3ee7 Deployed Feb 9, 2022 by vercel[bot]
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.

3 participants