mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Enhance MD022/blanks-around-headings with lines_above/lines_below parameters (fixes #143).
This commit is contained in:
parent
debc08bca1
commit
fa04d29485
24 changed files with 278 additions and 24 deletions
|
|
@ -328,14 +328,14 @@ module.exports.addError = addError;
|
|||
|
||||
// Adds an error object with details conditionally via the onError callback
|
||||
module.exports.addErrorDetailIf = function addErrorDetailIf(
|
||||
onError, lineNumber, expected, actual, detail, range) {
|
||||
onError, lineNumber, expected, actual, detail, context, range) {
|
||||
if (expected !== actual) {
|
||||
addError(
|
||||
onError,
|
||||
lineNumber,
|
||||
"Expected: " + expected + "; Actual: " + actual +
|
||||
(detail ? "; " + detail : ""),
|
||||
null,
|
||||
context,
|
||||
range);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue