From ca82125f0bdb9f96d73e6b1b9994e0a2f14b6c42 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 13 Nov 2023 13:06:29 +0000 Subject: [PATCH] feat(printer) Print `Debugger` statement (#1265) --- crates/oxc_prettier/src/format.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/oxc_prettier/src/format.rs b/crates/oxc_prettier/src/format.rs index e908c941f..4aeda7ae9 100644 --- a/crates/oxc_prettier/src/format.rs +++ b/crates/oxc_prettier/src/format.rs @@ -205,7 +205,10 @@ impl<'a> Format<'a> for WithStatement<'a> { impl<'a> Format<'a> for DebuggerStatement { fn format(&self, p: &mut Prettier<'a>) -> Doc<'a> { - Doc::Line + let mut parts = p.vec(); + parts.push(Doc::Str("debugger")); + parts.push(Doc::Str(";")); + Doc::Array(parts) } }