Prettier 3.9.9
Playground link
Input:
Output:
const a = (
<// c
div
/>
);
Second format (of the output above) fails:
Expression expected. (2:3)
Expected output:
const a = (
<
// c
div
/>
);
Why?
<// doesn't parse as the start of an element. The comment needs a line break after <.
Related: #8030 (the same in a closing tag, fixed).
Also reproduces on main (88d8e96).
Prettier 3.9.9
Playground link
Input:
Output:
Second format (of the output above) fails:
Expected output:
Why?
<//doesn't parse as the start of an element. The comment needs a line break after<.Related: #8030 (the same in a closing tag, fixed).
Also reproduces on
main(88d8e96).