Update MD031/blanks-around-fences to handle missing close fence.

This commit is contained in:
David Anson 2024-08-17 20:29:27 -07:00
parent c8fd9eb4b3
commit 2b8369ae39
5 changed files with 36 additions and 22 deletions

View file

@ -5017,7 +5017,7 @@ module.exports = {
if (!isBlankLine(lines[codeBlock.startLine - 2])) {
addError(onError, lines, codeBlock.startLine, true);
}
if (!isBlankLine(lines[codeBlock.endLine])) {
if (!isBlankLine(lines[codeBlock.endLine]) && !isBlankLine(lines[codeBlock.endLine - 1])) {
addError(onError, lines, codeBlock.endLine, false);
}
}