mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Update MD022/blanks-around-headings to allow specifying a different number of blank lines for each heading level (fixes #504).
This commit is contained in:
parent
bdc9d357f3
commit
d9de1dd22f
13 changed files with 690 additions and 64 deletions
|
|
@ -68,9 +68,10 @@ for (const rule of rules) {
|
|||
);
|
||||
for (const property of Object.keys(ruleData.properties).sort()) {
|
||||
const propData = ruleData.properties[property];
|
||||
const propType = (propData.type === "array") ?
|
||||
`${propData.items.type}[]` :
|
||||
propData.type;
|
||||
const propType = [ propData.type ]
|
||||
.flat()
|
||||
.map((type) => ((type === "array") ? `${propData.items.type}[]` : type))
|
||||
.join("|");
|
||||
const defaultValue = Array.isArray(propData.default) ?
|
||||
JSON.stringify(propData.default) :
|
||||
propData.default;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue