(pos protocol.Position)
| 85 | } |
| 86 | |
| 87 | func (d Document) FindLinkForPosition(pos protocol.Position) (Link, error) { |
| 88 | for _, link := range d.Links { |
| 89 | if positionInRange(d.Contents, link.Range, pos) { |
| 90 | return link, nil |
| 91 | } |
| 92 | } |
| 93 | return Link{}, ErrLinkNotFound |
| 94 | } |
| 95 | |
| 96 | func newLink(href string, t linkType, line, start, end int) Link { |
| 97 | if href == "" { |
no test coverage detected