Rename shouldNotPrePrintHardline to shouldPrePrintHardline (#10067)
This commit is contained in:
1 parent
87b5cfc8ab
commit
0144c7aa2f
1 file changed
+3
-3
@@ -721,7 +721,7 @@ function printChildren(path, options, print, events) {
|
||||
options,
|
||||
};
|
||||
|
||||
if (!shouldNotPrePrintHardline(childNode, data)) {
|
||||
if (shouldPrePrintHardline(childNode, data)) {
|
||||
parts.push(hardline);
|
||||
|
||||
// Can't find a case to pass `shouldPrePrintTripleHardline`
|
||||
@@ -772,7 +772,7 @@ function isPrettierIgnore(node) {
|
||||
return match === null ? false : match[1] ? match[1] : "next";
|
||||
}
|
||||
|
||||
function shouldNotPrePrintHardline(node, data) {
|
||||
function shouldPrePrintHardline(node, data) {
|
||||
const isFirstNode = data.parts.length === 0;
|
||||
const isInlineNode = INLINE_NODE_TYPES.includes(node.type);
|
||||
|
||||
@@ -780,7 +780,7 @@ function shouldNotPrePrintHardline(node, data) {
|
||||
node.type === "html" &&
|
||||
INLINE_NODE_WRAPPER_TYPES.includes(data.parentNode.type);
|
||||
|
||||
return isFirstNode || isInlineNode || isInlineHTML;
|
||||
return !isFirstNode && !isInlineNode && !isInlineHTML;
|
||||
}
|
||||
|
||||
function shouldPrePrintDoubleHardline(node, data) {
|
||||
|
||||
Reference in new issue
Block a user