|
|
|
|
@ -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
|
|
|
|
|
|
|
|
|
|
|