File tree 5 files changed +12
-8
lines changed
5 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -1154,7 +1154,7 @@ and print_jsx cxt ?(spread_props : J.expression option)
1154
1154
in
1155
1155
1156
1156
let print_prop n x ctx =
1157
- let prop_name = Js_dump_property. property_key_string n in
1157
+ let prop_name = Ext_ident. unwrap_uppercase_exotic n in
1158
1158
P. string f prop_name;
1159
1159
P. string f " =" ;
1160
1160
print_prop_value x ctx
Original file line number Diff line number Diff line change @@ -81,11 +81,9 @@ let property_access f s =
81
81
| _ -> Js_dump_string. pp_string f s
82
82
| exception _ -> Js_dump_string. pp_string f s)
83
83
84
- let property_key_string (s : string ) : string =
85
- let s = Ext_ident. unwrap_uppercase_exotic s in
86
- if obj_property_no_need_quot s then s else Js_dump_string. escape_to_string s
87
-
88
84
let property_key (s : J.property_name ) : string =
89
85
match s with
90
- | Lit s -> property_key_string s
86
+ | Lit s ->
87
+ let s = Ext_ident. unwrap_uppercase_exotic s in
88
+ if obj_property_no_need_quot s then s else Js_dump_string. escape_to_string s
91
89
| Symbol_name -> {| [Symbol. for (" name" )]| }
Original file line number Diff line number Diff line change 25
25
val property_access : Ext_pp .t -> string -> unit
26
26
27
27
val property_key : J .property_name -> string
28
-
29
- val property_key_string : string -> string
Original file line number Diff line number Diff line change @@ -203,6 +203,11 @@ let _optional_props = <Jsx_preserve_test$ComponentWithOptionalProps
203
203
element = { < div /> }
204
204
/> ;
205
205
206
+ let _props_with_hyphen = < label
207
+ aria-label = "close sidebar"
208
+ data-testid = "test"
209
+ /> ;
210
+
206
211
export {
207
212
Icon ,
208
213
_single_element_child ,
@@ -228,5 +233,6 @@ export {
228
233
_large_component ,
229
234
ComponentWithOptionalProps ,
230
235
_optional_props ,
236
+ _props_with_hyphen ,
231
237
}
232
238
/* _single_element_child Not a pure module */
Original file line number Diff line number Diff line change @@ -126,3 +126,5 @@ module ComponentWithOptionalProps = {
126
126
}
127
127
128
128
let _optional_props = <ComponentWithOptionalProps i = 1 s = "test" element = {<div />} />
129
+
130
+ let _props_with_hyphen = <label ariaLabel = {"close sidebar" } dataTestId = "test" />
You can’t perform that action at this time.
0 commit comments