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

Function kust_inline_text

internal/cbm/extract_k8s.c:292–299  ·  view source on GitHub ↗

The text of an inline patch: a block scalar's lines after its header line (`|`, `|-`, `|2`...), or a one-line scalar.

Source from the content-addressed store, hash-verified

290// The text of an inline patch: a block scalar's lines after its header line
291// (`|`, `|-`, `|2`...), or a one-line scalar.
292static const char *kust_inline_text(CBMExtractCtx *ctx, TSNode v) {
293 if (strcmp(ts_node_type(v), "block_scalar") == 0) {
294 const char *raw = cbm_node_text(ctx->arena, v, ctx->source);
295 const char *nl = raw ? strchr(raw, '\n') : NULL;
296 return nl ? nl + SKIP_ONE : NULL;
297 }
298 return get_scalar_text(ctx->arena, v, ctx->source);
299}
300
301// One line of an inline patch: its indent and `key: value` (the value
302// unquoted, a trailing comment dropped); false for a blank or comment line.

Callers 1

emit_kustomize_patchesFunction · 0.85

Calls 2

cbm_node_textFunction · 0.85
get_scalar_textFunction · 0.85

Tested by

no test coverage detected