Update documentation/docs/07-misc/07-v5-migration-guide.md

pull/17806/head
Rich Harris 6 months ago committed by GitHub
parent bb837a528f
commit 1c7a6bdd4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -688,7 +688,17 @@ Previously, Svelte employed a very complicated algorithm to determine if whitesp
- `foo - bar` in HTML
- `foo- bar` in Svelte 5
You can reintroduce the missing space by including it explicitly: `<p>foo<span>{' '}- bar</span></p>`
You can reintroduce the missing space by moving it outside the `<span>`...
```svelte
<p>foo <span>- bar</span></p>
```
...or, if necessary for styling reasons, including it as an expression:
```svelte
<p>foo<span>{' '}- bar</span></p>
```
- Certain exceptions apply such as keeping whitespace inside `pre` tags

Loading…
Cancel
Save