reason icon indicating copy to clipboard operation
reason copied to clipboard

Comment interleaving wrong before JSX

Open chenglou opened this issue 7 years ago • 1 comments
trafficstars

{
  /* foo */
  <div className />;
}

refmt as:

<div
  className
  /* foo */
/>;

chenglou avatar Jun 26 '18 09:06 chenglou

the following code:

let t =
  <Parent>
    // a
    React.null
    // b
    <ElementThatNeedsComment />
    // c
  </Parent>;

gets refmt'd into:

let t =
  <Parent>

      React.null
      // b
      <ElementThatNeedsComment />
    </Parent>;
    // c
    // a

jchavarri avatar Oct 18 '23 14:10 jchavarri