MCPcopy Create free account
hub / github.com/cli/cli / linkDestination

Function linkDestination

internal/attachments/references.go:304–312  ·  view source on GitHub ↗
(n ast.Node)

Source from the content-addressed store, hash-verified

302}
303
304func linkDestination(n ast.Node) (dest string, isEmbed bool, ok bool) {
305 switch v := n.(type) {
306 case *ast.Image:
307 return string(v.Destination), true, true
308 case *ast.Link:
309 return string(v.Destination), false, true
310 }
311 return "", false, false
312}
313
314// linkReferenceDefinitions indexes every one in the document by its
315// destination. One inside a code fence or a code span is not parsed as a

Callers 1

scanMarkdownRefsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected