mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
This commit is contained in:
parent
460836445c
commit
10f095c4fd
32 changed files with 3149 additions and 333 deletions
|
|
@ -748,7 +748,19 @@ function getReferenceLinkImageData(params) {
|
|||
if (definitions.has(reference)) {
|
||||
duplicateDefinitions.push([ reference, token.startLine - 1 ]);
|
||||
} else {
|
||||
definitions.set(reference, token.startLine - 1);
|
||||
let destinationString = null;
|
||||
const parent =
|
||||
micromark.getTokenParentOfType(token, [ "definition" ]);
|
||||
if (parent) {
|
||||
destinationString = micromark.getTokenTextByType(
|
||||
micromark.filterByPredicate(parent.children),
|
||||
"definitionDestinationString"
|
||||
);
|
||||
}
|
||||
definitions.set(
|
||||
reference,
|
||||
[ token.startLine - 1, destinationString ]
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue