Fix isSetextHeading (#19912)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
b38fc57487
commit
d9969c5734
1 file changed
+3
-2
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user