mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +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
|
|
@ -381,7 +381,8 @@ function lintContent(
|
|||
"lineNumber": errorInfo.lineNumber + frontMatterLines.length,
|
||||
"detail": errorInfo.detail || null,
|
||||
"context": errorInfo.context || null,
|
||||
"range": errorInfo.range || null
|
||||
"range": errorInfo.range || null,
|
||||
"fixInfo": errorInfo.fixInfo || null
|
||||
});
|
||||
}
|
||||
// Call (possibly external) rule function
|
||||
|
|
@ -423,6 +424,9 @@ function lintContent(
|
|||
errorObject.errorDetail = error.detail;
|
||||
errorObject.errorContext = error.context;
|
||||
errorObject.errorRange = error.range;
|
||||
if (resultVersion === 3) {
|
||||
errorObject.fixInfo = error.fixInfo;
|
||||
}
|
||||
return errorObject;
|
||||
});
|
||||
if (filteredErrors.length) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue