From bbbc80ed3177367ce3d88d5a4b7eea964e8d7914 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Mon, 13 Jan 2025 00:37:05 -0800 Subject: [PATCH] generated JS: improve indentation of switch cases --- jscomp/core/js_dump.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index 154919a24..47cc32792 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -485,7 +485,7 @@ and pp_one_case_clause : 'a. _ -> (_ -> 'a -> unit) -> 'a * J.case_clause -> _ = (switch_case, ({ switch_body; should_break; comment } : J.case_clause)) -> let cxt = group cxt 1 (fun () -> - group cxt 1 (fun () -> + group cxt 0 (fun () -> string cxt L.case; space cxt; pp_comment_option cxt comment; @@ -493,7 +493,7 @@ and pp_one_case_clause : 'a. _ -> (_ -> 'a -> unit) -> 'a * J.case_clause -> _ = (* could be integer or string *) space cxt; string cxt L.colon); - group cxt 1 (fun () -> + group cxt 0 (fun () -> let cxt = match switch_body with | [] -> cxt