Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
62 lines
567 B
Markdown
62 lines
567 B
Markdown
#### Fix comments inside template (#9278 by @fisker)
|
|
|
|
<!-- prettier-ignore -->
|
|
```js
|
|
// Input
|
|
html`${
|
|
foo
|
|
/* comment */
|
|
}`;
|
|
html`
|
|
${
|
|
foo
|
|
/* comment */
|
|
}
|
|
`;
|
|
graphql`${
|
|
foo
|
|
/* comment */
|
|
}`;
|
|
css`${
|
|
foo
|
|
/* comment */
|
|
}`;
|
|
|
|
// Prettier stable
|
|
html`${foo}`;
|
|
/* comment */
|
|
html`
|
|
${foo}
|
|
/* comment */
|
|
`;
|
|
graphql`
|
|
${foo}
|
|
/* comment */
|
|
`;
|
|
css`
|
|
${foo}
|
|
/* comment */
|
|
`;
|
|
|
|
|
|
// Prettier master
|
|
html`${
|
|
foo
|
|
/* comment */
|
|
}`;
|
|
html`
|
|
${
|
|
foo
|
|
/* comment */
|
|
}
|
|
`;
|
|
graphql`${
|
|
foo
|
|
/* comment */
|
|
}`;
|
|
css`${
|
|
foo
|
|
/* comment */
|
|
}`;
|
|
```
|