mirror of https://github.com/sveltejs/svelte
fix: preserve whitespace after inline elements when printing (#18685)
Fixes #18683. The printer previously trimmed leading whitespace after an inline element and failed to replace it when the fragment stayed on one line. Track that whitespace while grouping fragment nodes and emit a space for inline output, while retaining newline-based separation for multiline output. Adds regression coverage for whitespace following an inline element and updates existing print snapshots that exposed the same behavior.pull/18690/head
parent
3b559bbf96
commit
a6153f1d2a
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: preserve whitespace after inline elements when printing
|
||||
@ -0,0 +1 @@
|
||||
<p>Hello <strong>bold</strong> world</p>
|
||||
@ -0,0 +1 @@
|
||||
<p>Hello <strong>bold</strong> world</p>
|
||||
Loading…
Reference in new issue