mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-21 16:30:12 +01:00
Update all rules to better handle wrongly-typed configuration parameters.
This commit is contained in:
parent
26ad0550ec
commit
3238ed4249
25 changed files with 134 additions and 39 deletions
|
|
@ -10,7 +10,7 @@ module.exports = {
|
|||
"description": "Multiple consecutive blank lines",
|
||||
"tags": [ "whitespace", "blank_lines" ],
|
||||
"function": function MD012(params, onError) {
|
||||
const maximum = params.config.maximum || 1;
|
||||
const maximum = Number(params.config.maximum || 1);
|
||||
let count = 0;
|
||||
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {
|
||||
count = (inCode || line.trim().length) ? 0 : count + 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue