mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
Update MD032/blanks-around-lists to ignore (end-appended) undefined reference tokens when determining the last line of a list (fixes #1453).
This commit is contained in:
parent
599b687849
commit
8ad4698536
5 changed files with 24 additions and 10 deletions
|
@ -78,12 +78,11 @@ function addRangeToSet(set, start, end) {
|
|||
* Filter a list of Micromark tokens by predicate.
|
||||
*
|
||||
* @param {Token[]} tokens Micromark tokens.
|
||||
* @param {AllowedPredicate} [allowed] Allowed token predicate.
|
||||
* @param {AllowedPredicate} allowed Allowed token predicate.
|
||||
* @param {TransformPredicate} [transformChildren] Transform predicate.
|
||||
* @returns {Token[]} Filtered tokens.
|
||||
*/
|
||||
function filterByPredicate(tokens, allowed, transformChildren) {
|
||||
allowed = allowed || (() => true);
|
||||
const result = [];
|
||||
const queue = [
|
||||
{
|
||||
|
@ -278,7 +277,11 @@ const nonContentTokens = new Set([
|
|||
"lineEnding",
|
||||
"lineEndingBlank",
|
||||
"linePrefix",
|
||||
"listItemIndent"
|
||||
"listItemIndent",
|
||||
"undefinedReference",
|
||||
"undefinedReferenceCollapsed",
|
||||
"undefinedReferenceFull",
|
||||
"undefinedReferenceShortcut"
|
||||
]);
|
||||
|
||||
module.exports = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue