From 3910eb888b650744c0141846db7edb108bd12e6a Mon Sep 17 00:00:00 2001 From: Taco de Wolff Date: Thu, 23 Nov 2023 17:28:31 -0300 Subject: [PATCH] JS AST: fix indenting for comments --- js/ast.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/ast.go b/js/ast.go index a9608f5..81155bc 100644 --- a/js/ast.go +++ b/js/ast.go @@ -430,6 +430,9 @@ func (n Comment) String() string { // JS writes JavaScript to writer. func (n Comment) JS(w io.Writer) { + if wi, ok := w.(Indenter); ok { + w = wi.w + } w.Write(n.Value) w.Write([]byte("\n")) }