fix: update markdown-it to v14.1.0

This allows to use the same version as markdownlint v0.34.0.
This commit is contained in:
2024-04-06 20:10:13 +02:00
parent 5af131b840
commit 9675c7a275
7 changed files with 1642 additions and 1959 deletions

View File

@ -22,6 +22,7 @@ const customRule = {
names: ["relative-links"],
description: "Relative links should be valid",
tags: ["links"],
parser: "markdownit",
function: (params, onError) => {
filterTokens(params, "inline", (token) => {
const children = token.children ?? []

View File

@ -15,7 +15,7 @@
* @returns {void}
*/
const filterTokens = (params, type, handler) => {
for (const token of params.tokens) {
for (const token of params.parsers.markdownit.tokens) {
if (token.type === type) {
handler(token)
}