You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export function Example1() {
/** NOT formatted because has empty line */
const x = '42';
return x;
}
I removed the extra empty line before the return statement and replaced the double quotes around the string constant with single quotes, I thino that's what is in the original cpde.
Prettier 3.2.5
Playground link
# Options (if any): --parser mdx
Input:
Output:
Expected output:
Why?
Seems to be a bug when there is an empty line. If the line has at least some whitespace, of if there are no lines, the formatting works as expected.
Related: #13934
The text was updated successfully, but these errors were encountered: