fix(prettier) Fix debug printing if IfBreak` doc (#1561)

This commit is contained in:
Cameron 2023-11-28 02:34:28 +00:00 committed by GitHub
parent 92c1d9d527
commit fe7f6efff2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -269,12 +269,12 @@ fn print_doc_to_debug(doc: &Doc<'_>) -> std::string::String {
}
Doc::IfBreak(if_break) => {
string.push_str(&format!(
"ifBreak({}, {})",
"ifBreak({}, {}",
print_doc_to_debug(&if_break.break_contents),
print_doc_to_debug(&if_break.flat_content)
));
if let Some(group_id) = if_break.group_id {
string.push_str(&format!("{{ groupId: {group_id} }}"));
string.push_str(&format!(", {{ groupId: {group_id} }}"));
}
string.push(')');
}