Fix isSetextHeading (#19912)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
fisker Cheungandautofix-ci[bot] authored and GitHub committed 2026-08-23 16:13:56 +08:00
1 parent b38fc57487
commit d9969c5734
1 file changed
+3 -2
+3 -2
View File
@@ -317,8 +317,9 @@ function hasPrettierIgnore(path) {
}
function isSetextHeading(node) {
const { start, end } = node.position;
return start.line !== end.line;
return (
node.type === "heading" && node.position.start.line < node.position.end.line
);
}
const isNewLine = (node) => node?.type === "whitespace" && node.value === "\n";