mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-20 16:00:13 +01:00
Add infrastructure for rules to include fix information when logging violations, update MD047 (refs #80).
This commit is contained in:
parent
6e086114b1
commit
cdd87e647f
6 changed files with 248 additions and 19 deletions
12
lib/md047.js
12
lib/md047.js
|
|
@ -12,7 +12,17 @@ module.exports = {
|
|||
const lastLineNumber = params.lines.length;
|
||||
const lastLine = params.lines[lastLineNumber - 1];
|
||||
if (!isBlankLine(lastLine)) {
|
||||
addError(onError, lastLineNumber);
|
||||
addError(
|
||||
onError,
|
||||
lastLineNumber,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{
|
||||
"insertText": "\n",
|
||||
"editColumn": lastLine.length + 1
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue