-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang:jsxIssues affecting JSX (not general JS issues)Issues affecting JSX (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
Prettier 2.3.2
Playground link
--parser babel
Input:
function MyFunctionComponent() {
<button label=/*old*/"new">button</button>
}
Output:
Error: Comment "old" was not printed. Please report this error!
at Object.ensureAllCommentsPrinted (https://prettier.io/lib/standalone.js:36:119166)
at Sd (https://prettier.io/lib/standalone.js:36:125590)
at Nd (https://prettier.io/lib/standalone.js:36:128103)
at Object.formatWithCursor (https://prettier.io/lib/standalone.js:76:38121)
at formatCode (https://prettier.io/worker.js:141:21)
at handleMessage (https://prettier.io/worker.js:78:26)
at self.onmessage (https://prettier.io/worker.js:36:14)
Expected behaviour:
The document should be formatted as usual
Metadata
Metadata
Assignees
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang:jsxIssues affecting JSX (not general JS issues)Issues affecting JSX (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.