File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -1154,20 +1154,10 @@ and print_jsx cxt ?(spread_props : J.expression option)
11541154 in
11551155
11561156 let print_prop n x ctx =
1157- let n =
1158- (* turn aria-label to ariaLabel *)
1159- if not (String. contains n '-' ) then n
1160- else
1161- let chars = String. to_seq n |> List. of_seq in
1162- let rec visit chars acc =
1163- match chars with
1164- | [] -> List. rev acc
1165- | '-' :: l :: rest -> visit rest (Char. uppercase_ascii l :: acc)
1166- | c :: rest -> visit rest (c :: acc)
1167- in
1168- visit chars [] |> List. to_seq |> String. of_seq
1157+ let prop_name =
1158+ if String. starts_with ~prefix: " aria-" n then n
1159+ else Js_dump_property. property_key_string n
11691160 in
1170- let prop_name = Js_dump_property. property_key_string n in
11711161 P. string f prop_name;
11721162 P. string f " =" ;
11731163 print_prop_value x ctx
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ let _optional_props = <Jsx_preserve_test$ComponentWithOptionalProps
204204/> ;
205205
206206let _props_with_hypen = < label
207- ariaLabel = "close sidebar"
207+ aria-label = "close sidebar"
208208/> ;
209209
210210export {
You can’t perform that action at this time.
0 commit comments