mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Update MD011/MD034 to report fixInfo for violations.
This commit is contained in:
parent
5e73aa1d9d
commit
620853f200
3 changed files with 41 additions and 8 deletions
15
lib/md034.js
15
lib/md034.js
|
|
@ -26,7 +26,20 @@ module.exports = {
|
|||
line.indexOf(content) + match.index + 1,
|
||||
bareUrl.length
|
||||
];
|
||||
addErrorContext(onError, lineNumber, bareUrl, null, null, range);
|
||||
const fixInfo = range ? {
|
||||
"editColumn": range[0],
|
||||
"deleteCount": range[1],
|
||||
"insertText": `<${bareUrl}>`
|
||||
} : null;
|
||||
addErrorContext(
|
||||
onError,
|
||||
lineNumber,
|
||||
bareUrl,
|
||||
null,
|
||||
null,
|
||||
range,
|
||||
fixInfo
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue