within reports whether i falls inside any of ranges.
(ranges []byteRange, i int)
| 588 | |
| 589 | // within reports whether i falls inside any of ranges. |
| 590 | func within(ranges []byteRange, i int) bool { |
| 591 | for _, s := range ranges { |
| 592 | if i >= s.start && i < s.stop { |
| 593 | return true |
| 594 | } |
| 595 | } |
| 596 | return false |
| 597 | } |
| 598 | |
| 599 | // inlineDestination finds the destination written beside a reference, as the |
| 600 | // "./f.png" of [text](./f.png). |