within reports whether i falls inside any of ranges.
(ranges []byteRange, i int)
| 551 | |
| 552 | // within reports whether i falls inside any of ranges. |
| 553 | func within(ranges []byteRange, i int) bool { |
| 554 | for _, s := range ranges { |
| 555 | if i >= s.start && i < s.stop { |
| 556 | return true |
| 557 | } |
| 558 | } |
| 559 | return false |
| 560 | } |
| 561 | |
| 562 | // inlineDestination finds the destination written beside a reference, as the |
| 563 | // "./f.png" of [text](./f.png). |