mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Reimplement MD009/no-trailing-spaces using micromark tokens.
This commit is contained in:
parent
37ab4a0faf
commit
4072cf7417
7 changed files with 380 additions and 116 deletions
|
|
@ -169,17 +169,6 @@ function isBlankLine(line) {
|
|||
}
|
||||
module.exports.isBlankLine = isBlankLine;
|
||||
|
||||
/**
|
||||
* Compare function for Array.prototype.sort for ascending order of numbers.
|
||||
*
|
||||
* @param {number} a First number.
|
||||
* @param {number} b Second number.
|
||||
* @returns {number} Positive value if a>b, negative value if b<a, 0 otherwise.
|
||||
*/
|
||||
module.exports.numericSortAscending = function numericSortAscending(a, b) {
|
||||
return a - b;
|
||||
};
|
||||
|
||||
// Returns true iff the sorted array contains the specified element
|
||||
module.exports.includesSorted = function includesSorted(array, element) {
|
||||
let left = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue