mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Reimplement MD013/line-length using micromark tokens.
This commit is contained in:
parent
4072cf7417
commit
3b581a7f6d
10 changed files with 173 additions and 185 deletions
16
lib/md009.js
16
lib/md009.js
|
|
@ -3,21 +3,7 @@
|
|||
"use strict";
|
||||
|
||||
const { addError } = require("../helpers");
|
||||
const { filterByTypes } = require("../helpers/micromark.cjs");
|
||||
|
||||
/**
|
||||
* Adds a range of numbers to a set.
|
||||
*
|
||||
* @param {Set<number>} set Set of numbers.
|
||||
* @param {number} start Starting number.
|
||||
* @param {number} end Ending number.
|
||||
* @returns {void}
|
||||
*/
|
||||
function addRangeToSet(set, start, end) {
|
||||
for (let i = start; i <= end; i++) {
|
||||
set.add(i);
|
||||
}
|
||||
}
|
||||
const { addRangeToSet, filterByTypes } = require("../helpers/micromark.cjs");
|
||||
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
/** @type import("./markdownlint").Rule */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue