File tree Expand file tree Collapse file tree 5 files changed +12
-8
lines changed Expand file tree Collapse file tree 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)
11541154 in
11551155
11561156 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
11581158 P. string f prop_name;
11591159 P. string f " =" ;
11601160 print_prop_value x ctx
Original file line number Diff line number Diff line change @@ -81,11 +81,9 @@ let property_access f s =
8181 | _ -> Js_dump_string. pp_string f s
8282 | exception _ -> Js_dump_string. pp_string f s)
8383
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-
8884let property_key (s : J.property_name ) : string =
8985 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
9189 | Symbol_name -> {| [Symbol. for (" name" )]| }
Original file line number Diff line number Diff line change 2525val property_access : Ext_pp .t -> string -> unit
2626
2727val 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
203203 element = { < div /> }
204204/> ;
205205
206+ let _props_with_hyphen = < label
207+ aria-label = "close sidebar"
208+ data-testid = "test"
209+ /> ;
210+
206211export {
207212 Icon ,
208213 _single_element_child ,
@@ -228,5 +233,6 @@ export {
228233 _large_component ,
229234 ComponentWithOptionalProps ,
230235 _optional_props ,
236+ _props_with_hyphen ,
231237}
232238/* _single_element_child Not a pure module */
Original file line number Diff line number Diff line change @@ -126,3 +126,5 @@ module ComponentWithOptionalProps = {
126126}
127127
128128let _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