Fix embedded template literal idempotency (#19725)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-07-26 16:35:21 +08:00
1 parent 8ffc849446
commit 3a106fdff1
13 files changed
+413 -21

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
#### Fix embedded template literal idempotency (#19725 by @fisker)
<!-- prettier-ignore -->
```jsx
// Input
const foo = html`
<div>${getText({
value,
})}</div>
`;
// Prettier stable (first format)
const foo = html`
<div>
${getText({
value,
})}
</div>
`;
// Prettier stable (second format)
const foo = html`
<div>
${getText({
value,
})}
</div>
`;
// Prettier main
const foo = html`
<div>
${getText({
value,
})}
</div>
`;
```