A reference-style link whose label is s[0..n): its destination is the * definition's, or (rustdoc's broken-link callback) the label itself. */
| 1736 | /* A reference-style link whose label is s[0..n): its destination is the |
| 1737 | * definition's, or (rustdoc's broken-link callback) the label itself. */ |
| 1738 | static void rs_emit_reference(rs_sink_t *k, int kind, const char *label, uint32_t n, uint32_t off) { |
| 1739 | const char *norm = rs_label_norm(rs_scratch(k->ctx), label, n); |
| 1740 | if (!norm || norm[0] == '^') { |
| 1741 | return; /* empty, or a footnote */ |
| 1742 | } |
| 1743 | const rs_def_t *def = rs_def_find(k->defs, norm); |
| 1744 | if (def) { |
| 1745 | rs_emit_link(k, kind, def->dest, def->dest_len, true, off); |
| 1746 | } else { |
| 1747 | rs_emit_link(k, kind, label, n, false, off); |
| 1748 | } |
| 1749 | } |
| 1750 | |
| 1751 | static int rs_run_len_cmp(const void *a, const void *b) { |
| 1752 | const rs_run_t *x = (const rs_run_t *)a; |
no test coverage detected