Skip to content

Commit 2ebff68

Browse files
authored
Revert "allow hyphen in jsx prop names" (#6705) (#6731)
This reverts commit 1ec144b.
1 parent 73e68a6 commit 2ebff68

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
1313
# 11.1.0-rc.9 (Unreleased)
1414

15+
#### :bug: Bug Fix
16+
17+
- revert escape JSX prop names with hyphens (#6705). https://github.com/rescript-lang/rescript-compiler/pull/6731.
18+
1519
# 11.1.0-rc.8
1620

1721
#### :rocket: New Feature

jscomp/syntax/src/res_printer.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4410,7 +4410,6 @@ and printJsxProps ~state args cmtTbl : Doc.t * Parsetree.expression option =
44104410
loop [] args
44114411

44124412
and printJsxProp ~state arg cmtTbl =
4413-
let printIdentLike ident = printIdentLike ~allowHyphen:true ident in
44144413
match arg with
44154414
| ( ((Asttypes.Labelled lblTxt | Optional lblTxt) as lbl),
44164415
{

jscomp/syntax/tests/printer/expr/expected/exoticIdent.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ lazy \"let"
6262
let x = 1
6363

6464
let x =
65-
<div aria-foo=\"type">
65+
<div \"aria-foo"=\"type">
6666
\"module"
6767
\"let"
6868
</div>

jscomp/syntax/tests/printer/expr/expected/jsx.res.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ let x =
4747
{a}
4848
<B />
4949
</Foo.custom-tag>
50-
let x =
51-
<custom-tag data-custom-state=true>
52-
{a}
53-
<B />
54-
</custom-tag>
5550

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

jscomp/syntax/tests/printer/expr/jsx.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ let x = <A> {a} </A>
1717
let x = <A> {a} {b} </A>
1818
let x = <custom-tag className="container" > {a} <B/> </custom-tag>
1919
let x = <Foo.custom-tag className="container" > {a} <B/> </Foo.custom-tag>
20-
let x = <custom-tag data-custom-state=true > {a} <B/> </custom-tag>
2120

2221
let x =
2322
<div

0 commit comments

Comments
 (0)