mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Split micromark.cjs into separate -parse and -helpers files.
This commit is contained in:
parent
5701d0bf52
commit
33631a5984
47 changed files with 353 additions and 1236 deletions
10
lib/md039.js
10
lib/md039.js
|
|
@ -3,15 +3,15 @@
|
|||
"use strict";
|
||||
|
||||
const { addErrorContext } = require("../helpers");
|
||||
const { filterByTypes } = require("../helpers/micromark.cjs");
|
||||
const { filterByTypes } = require("../helpers/micromark-helpers.cjs");
|
||||
const { getReferenceLinkImageData, filterByTypesCached } = require("./cache");
|
||||
|
||||
/**
|
||||
* Adds an error for a label space issue.
|
||||
*
|
||||
* @param {import("./markdownlint").RuleOnError} onError Error-reporting callback.
|
||||
* @param {import("../helpers/micromark.cjs").Token} label Label token.
|
||||
* @param {import("../helpers/micromark.cjs").Token} labelText LabelText token.
|
||||
* @param {import("../helpers/micromark-helpers.cjs").Token} label Label token.
|
||||
* @param {import("../helpers/micromark-helpers.cjs").Token} labelText LabelText token.
|
||||
* @param {boolean} isStart True iff error is at the start of the link.
|
||||
*/
|
||||
function addLabelSpaceError(onError, label, labelText, isStart) {
|
||||
|
|
@ -41,8 +41,8 @@ function addLabelSpaceError(onError, label, labelText, isStart) {
|
|||
/**
|
||||
* Determines if a link is a valid link (and not a fake shortcut link due to parser tricks).
|
||||
*
|
||||
* @param {import("../helpers/micromark.cjs").Token} label Label token.
|
||||
* @param {import("../helpers/micromark.cjs").Token} labelText LabelText token.
|
||||
* @param {import("../helpers/micromark-helpers.cjs").Token} label Label token.
|
||||
* @param {import("../helpers/micromark-helpers.cjs").Token} labelText LabelText token.
|
||||
* @param {Map<string, any>} definitions Map of link definitions.
|
||||
* @returns {boolean} True iff the link is valid.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue