RFC: indentIfBreak (#10221)
This commit is contained in:
1 parent
575be32c05
commit
5a33fec904
14 files changed
+221
-31
No files matched your search
@@ -121,6 +121,23 @@ function printDocToDebug(doc) {
|
||||
);
|
||||
}
|
||||
|
||||
if (doc.type === "indent-if-break") {
|
||||
const optionsParts = [];
|
||||
|
||||
if (doc.negate) {
|
||||
optionsParts.push("negate: true");
|
||||
}
|
||||
|
||||
if (doc.groupId) {
|
||||
optionsParts.push(`groupId: ${printGroupId(doc.groupId)}`);
|
||||
}
|
||||
|
||||
const options =
|
||||
optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : "";
|
||||
|
||||
return `indentIfBreak(${printDoc(doc.contents)}${options})`;
|
||||
}
|
||||
|
||||
if (doc.type === "group") {
|
||||
const optionsParts = [];
|
||||
|
||||
|
||||
Reference in new issue
Block a user