| 973 | } |
| 974 | |
| 975 | static void adr_push_relation(adr_doc_t *d, const char *adr_qn, const char *raw, size_t n, |
| 976 | uint32_t line, uint16_t syntax) { |
| 977 | CBMArena *a = d->ctx->arena; |
| 978 | char *text = cbm_arena_strndup(a, raw, n); |
| 979 | if (!text) { |
| 980 | d->ctx->result->doc_links.failed = true; |
| 981 | return; |
| 982 | } |
| 983 | CBMDocLink link = {.source_qn = adr_qn, |
| 984 | .raw = text, |
| 985 | .line = line, |
| 986 | .def_line = SKIP_ONE, |
| 987 | .syntax = syntax, |
| 988 | .flags = 0}; |
| 989 | cbm_doclinks_push(&d->ctx->result->doc_links, a, link); |
| 990 | } |
| 991 | |
| 992 | /* The targets after a relation phrase, up to the end of its sentence: link |
| 993 | * destinations and ADR ids. Forward relations become tokens of family |
no test coverage detected