Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

- Improve error when using '@deriving(accessors)' on a variant with record arguments. https://github.com/rescript-lang/rescript-compiler/pull/6712

- Stop escaping JSX prop names with hyphens. https://github.com/rescript-lang/rescript-compiler/pull/6705

# 11.1.0-rc.7

#### :bug: Bug Fix
Expand Down
1 change: 1 addition & 0 deletions jscomp/syntax/src/res_printer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4410,6 +4410,7 @@ and printJsxProps ~state args cmtTbl : Doc.t * Parsetree.expression option =
loop [] args

and printJsxProp ~state arg cmtTbl =
let printIdentLike ident = printIdentLike ~allowHyphen:true ident in
match arg with
| ( ((Asttypes.Labelled lblTxt | Optional lblTxt) as lbl),
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ lazy \"let"
let x = 1

let x =
<div \"aria-foo"=\"type">
<div aria-foo=\"type">
\"module"
\"let"
</div>
5 changes: 5 additions & 0 deletions jscomp/syntax/tests/printer/expr/expected/jsx.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ let x =
{a}
<B />
</Foo.custom-tag>
let x =
<custom-tag data-custom-state=true>
{a}
<B />
</custom-tag>

let x = <div className="container" className2="container2" className3="container3" onClick />

Expand Down
1 change: 1 addition & 0 deletions jscomp/syntax/tests/printer/expr/jsx.res
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ let x = <A> {a} </A>
let x = <A> {a} {b} </A>
let x = <custom-tag className="container" > {a} <B/> </custom-tag>
let x = <Foo.custom-tag className="container" > {a} <B/> </Foo.custom-tag>
let x = <custom-tag data-custom-state=true > {a} <B/> </custom-tag>

let x =
<div
Expand Down