Treat image labels as Markdown alternative text

This commit is contained in:
2026-10-08 01:32:29 +00:00
parent 95599e96f6
commit 2e0d302178
4 changed files with 46 additions and 2 deletions

View File

@@ -82,6 +82,8 @@ func parseMarkdown(source []byte) *markdownDocument {
Reference: node.Reference != nil,
Location: markdownLocationAt(lineStarts, node.Pos()),
})
// Image labels contribute alternative text, not navigable destinations.
return ast.WalkSkipChildren, nil
case *ast.AutoLink:
document.links = append(document.links, markdownLink{
Destination: node.Destination.Value(source),