prettier-tailwind icon indicating copy to clipboard operation
prettier-tailwind copied to clipboard

Sometimes, a comment on the line of className gets trimmed by accident

Open kripod opened this issue 4 years ago • 0 comments

In the following example:

<div
  className="no-overflow-anchoring   py-16" // TODO: User-adjustable section height
>
  Hello, world
</div>

When I run Prettier, the result becomes:

<div
  className="no-overflow-anchoring py-16" " // TODO: User-adjustable section heig
>
  Hello, world
</div>

Which is wrong. Please notice the missing 'ht' characters from 'height' and the duplicate '"' before the comment.

kripod avatar Sep 03 '20 11:09 kripod