diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ccaf4bd3e..8449ec9292 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ # 11.1.0-rc.9 (Unreleased) +#### :bug: Bug Fix + +- revert escape JSX prop names with hyphens (#6705). https://github.com/rescript-lang/rescript-compiler/pull/6731. + # 11.1.0-rc.8 #### :rocket: New Feature diff --git a/jscomp/syntax/src/res_printer.ml b/jscomp/syntax/src/res_printer.ml index 96541a8d06..c7a715f8ce 100644 --- a/jscomp/syntax/src/res_printer.ml +++ b/jscomp/syntax/src/res_printer.ml @@ -4410,7 +4410,6 @@ 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), { diff --git a/jscomp/syntax/tests/printer/expr/expected/exoticIdent.res.txt b/jscomp/syntax/tests/printer/expr/expected/exoticIdent.res.txt index 21212ee4a8..d3dc9ecd77 100644 --- a/jscomp/syntax/tests/printer/expr/expected/exoticIdent.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/exoticIdent.res.txt @@ -62,7 +62,7 @@ lazy \"let" let x = 1 let x = -
+
\"module" \"let"
diff --git a/jscomp/syntax/tests/printer/expr/expected/jsx.res.txt b/jscomp/syntax/tests/printer/expr/expected/jsx.res.txt index e3912ef814..8c689a829c 100644 --- a/jscomp/syntax/tests/printer/expr/expected/jsx.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/jsx.res.txt @@ -47,11 +47,6 @@ let x = {a} -let x = - - {a} - - let x =
diff --git a/jscomp/syntax/tests/printer/expr/jsx.res b/jscomp/syntax/tests/printer/expr/jsx.res index a44ecaa71f..c86868bc38 100644 --- a/jscomp/syntax/tests/printer/expr/jsx.res +++ b/jscomp/syntax/tests/printer/expr/jsx.res @@ -17,7 +17,6 @@ let x = {a} let x = {a} {b} let x = {a} let x = {a} -let x = {a} let x =