File tree 4 files changed +17
-2
lines changed
4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ These are only breaking changes for unformatted code.
63
63
- Fix issue with using alias and default value together https://github.com/rescript-lang/rescript-compiler/pull/5989
64
64
- GenType: fix issue with V3 compatibility mode (see https://github.com/rescript-lang/rescript-compiler/issues/5990 ) https://github.com/rescript-lang/rescript-compiler/pull/5991
65
65
- Fix issue in ` Js.Promise2 ` where ` then ` and ` catch ` were returning ` undefined ` https://github.com/rescript-lang/rescript-compiler/pull/5997
66
+ - Fix formatting of props spread for multiline JSX expression https://github.com/rescript-lang/rescript-compiler/pull/6006
66
67
67
68
#### :nail_care : Polish
68
69
Original file line number Diff line number Diff line change @@ -4264,7 +4264,7 @@ and printJsxProp ~state arg cmtTbl =
4264
4264
| Optional _lbl -> Doc. concat [Doc. question; printIdentLike ident])
4265
4265
| Asttypes. Labelled "_spreadProps" , expr ->
4266
4266
let doc = printExpressionWithComments ~state expr cmtTbl in
4267
- Doc. concat [Doc. lbrace; Doc. dotdotdot; Doc. softLine; doc; Doc. rbrace]
4267
+ Doc. concat [Doc. lbrace; Doc. dotdotdot; doc; Doc. rbrace]
4268
4268
| lbl , expr ->
4269
4269
let argLoc, expr =
4270
4270
match expr.pexp_attributes with
Original file line number Diff line number Diff line change @@ -410,3 +410,10 @@ let v =
410
410
</A>
411
411
412
412
let x = <A x="y" {...str} />
413
+
414
+ // https://github.com/rescript-lang/rescript-compiler/issues/6002
415
+ let x = props =>
416
+ <A
417
+ {...props}
418
+ className="inline-block px-6 py-2.5 bg-blue-600 text-white font-medium text-xs leading-tight"
419
+ />
Original file line number Diff line number Diff line change @@ -402,4 +402,11 @@ let v =
402
402
</B >
403
403
</A >
404
404
405
- let x = <A x = "y" {... str } />
405
+ let x = <A x = "y" {... str } />
406
+
407
+ // https://github.com/rescript-lang/rescript-compiler/issues/6002
408
+ let x = props =>
409
+ <A
410
+ {... props }
411
+ className = "inline-block px-6 py-2.5 bg-blue-600 text-white font-medium text-xs leading-tight"
412
+ />
You can’t perform that action at this time.
0 commit comments