MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / adr_continuation

Function adr_continuation

internal/cbm/doc_adr.c:1192–1211  ·  view source on GitHub ↗

Line k continues a paragraph: no list, quote or table mark opens it and the * line before is running text, not blank, a heading or a field * (`[ADR-0240](0240-x.md)` / `supersedes ADR-0134 and ...`: in a held-out * census the subject was the record on the line before). */

Source from the content-addressed store, hash-verified

1190 * (`[ADR-0240](0240-x.md)` / `supersedes ADR-0134 and ...`: in a held-out
1191 * census the subject was the record on the line before). */
1192static bool adr_continuation(const adr_doc_t *d, int k) {
1193 const adr_line_t *l = &d->L.v[k];
1194 int j = 0;
1195 while (j < l->n && adr_blank(l->s[j])) {
1196 j++;
1197 }
1198 if (j < l->n && (l->s[j] == '-' || l->s[j] == '*' || l->s[j] == '+' || l->s[j] == '>' ||
1199 l->s[j] == '|' || adr_digit(l->s[j]))) {
1200 return false; /* its own list item, quote or table row */
1201 }
1202 if (k <= d->L.fm_end || k == 0) {
1203 return false;
1204 }
1205 const adr_line_t *p = &d->L.v[k - SKIP_ONE];
1206 int a = 0;
1207 while (a < p->n && adr_blank(p->s[a])) {
1208 a++;
1209 }
1210 return p->text && a < p->n && p->s[a] != '#' && !adr_field_line(p);
1211}
1212
1213static bool adr_direct_ref(const char *s, size_t n) {
1214 size_t i = 0;

Callers 1

adr_relationsFunction · 0.85

Calls 3

adr_blankFunction · 0.85
adr_digitFunction · 0.85
adr_field_lineFunction · 0.85

Tested by

no test coverage detected