fix(prettier) Print intend in doc debug view (#1419)

This commit is contained in:
Cameron 2023-11-19 03:07:32 +00:00 committed by GitHub
parent 5543e8c435
commit 91ee3e8bfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,12 +108,14 @@ fn print_do_to_debug(doc: &Doc<'_>) -> std::string::String {
string.push_str("]\n");
}
Doc::Indent(contents) => {
string.push_str("indent([");
for (idx, doc) in contents.iter().enumerate() {
string.push_str(&print_do_to_debug(doc));
if idx != contents.len() - 1 {
string.push_str(", ");
}
}
string.push_str("])");
}
Doc::Group(contents) => {
string.push_str("group([\n");