From 0ecd500ddac5bab553e8daf008842b4bb5a1cb2c Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 5 Jan 2023 19:52:17 +0100 Subject: [PATCH] Fix jsx mode being ignored when set via @@jsxConfig --- lib/4.06.1/unstable/js_compiler.ml | 3 ++- lib/4.06.1/unstable/js_playground_compiler.ml | 3 ++- lib/4.06.1/whole_compiler.ml | 3 ++- syntax | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/4.06.1/unstable/js_compiler.ml b/lib/4.06.1/unstable/js_compiler.ml index 86c19f8128..e7237c51ae 100644 --- a/lib/4.06.1/unstable/js_compiler.ml +++ b/lib/4.06.1/unstable/js_compiler.ml @@ -276194,7 +276194,8 @@ let getJsxConfigByKey ~key ~type_ recordFields = Some value | ( String, {txt = Lident k}, - {pexp_desc = Pexp_constant (Pconst_string (value, None))} ) + (* accept both normal strings and "js" strings *) + {pexp_desc = Pexp_constant (Pconst_string (value, _))} ) when k = key -> Some value | _ -> None) diff --git a/lib/4.06.1/unstable/js_playground_compiler.ml b/lib/4.06.1/unstable/js_playground_compiler.ml index 9d08d366ac..450bbffb6b 100644 --- a/lib/4.06.1/unstable/js_playground_compiler.ml +++ b/lib/4.06.1/unstable/js_playground_compiler.ml @@ -276194,7 +276194,8 @@ let getJsxConfigByKey ~key ~type_ recordFields = Some value | ( String, {txt = Lident k}, - {pexp_desc = Pexp_constant (Pconst_string (value, None))} ) + (* accept both normal strings and "js" strings *) + {pexp_desc = Pexp_constant (Pconst_string (value, _))} ) when k = key -> Some value | _ -> None) diff --git a/lib/4.06.1/whole_compiler.ml b/lib/4.06.1/whole_compiler.ml index 0ef8869604..491d1e0ca8 100644 --- a/lib/4.06.1/whole_compiler.ml +++ b/lib/4.06.1/whole_compiler.ml @@ -286578,7 +286578,8 @@ let getJsxConfigByKey ~key ~type_ recordFields = Some value | ( String, {txt = Lident k}, - {pexp_desc = Pexp_constant (Pconst_string (value, None))} ) + (* accept both normal strings and "js" strings *) + {pexp_desc = Pexp_constant (Pconst_string (value, _))} ) when k = key -> Some value | _ -> None) diff --git a/syntax b/syntax index 383504253c..fff41d19bc 160000 --- a/syntax +++ b/syntax @@ -1 +1 @@ -Subproject commit 383504253c5c288902d41dd6cb90e0eabf73cd3e +Subproject commit fff41d19bc58e9a5c79c8443763544a28998a007