mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Rename markdownlint-micromark Token's .tokens property to .children for consistency and clarity.
This commit is contained in:
parent
781b854f4b
commit
13ced64c21
6 changed files with 1558 additions and 1558 deletions
|
|
@ -858,31 +858,31 @@ function getReferenceLinkImageData(params) {
|
|||
let labelText = null;
|
||||
let referenceStringText = null;
|
||||
const shortcutCandidate =
|
||||
micromark.matchAndGetTokensByType(token.tokens, [ "label" ]);
|
||||
micromark.matchAndGetTokensByType(token.children, [ "label" ]);
|
||||
if (shortcutCandidate) {
|
||||
labelText =
|
||||
micromark.getTokenTextByType(
|
||||
shortcutCandidate[0].tokens, "labelText"
|
||||
shortcutCandidate[0].children, "labelText"
|
||||
);
|
||||
isShortcut = (labelText !== null);
|
||||
}
|
||||
const fullAndCollapsedCandidate =
|
||||
micromark.matchAndGetTokensByType(
|
||||
token.tokens, [ "label", "reference" ]
|
||||
token.children, [ "label", "reference" ]
|
||||
);
|
||||
if (fullAndCollapsedCandidate) {
|
||||
labelText =
|
||||
micromark.getTokenTextByType(
|
||||
fullAndCollapsedCandidate[0].tokens, "labelText"
|
||||
fullAndCollapsedCandidate[0].children, "labelText"
|
||||
);
|
||||
referenceStringText =
|
||||
micromark.getTokenTextByType(
|
||||
fullAndCollapsedCandidate[1].tokens, "referenceString"
|
||||
fullAndCollapsedCandidate[1].children, "referenceString"
|
||||
);
|
||||
isFullOrCollapsed = (labelText !== null);
|
||||
}
|
||||
const footnote = micromark.matchAndGetTokensByType(
|
||||
token.tokens,
|
||||
token.children,
|
||||
[
|
||||
"gfmFootnoteCallLabelMarker", "gfmFootnoteCallMarker",
|
||||
"gfmFootnoteCallString", "gfmFootnoteCallLabelMarker"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue