Treat image labels as Markdown alternative text
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user