MCPcopy Index your code
hub / github.com/itwanger/toBeBetterJavaer / detectChildIndent

Function detectChildIndent

scripts/sync-sidebar.js:336–345  ·  view source on GitHub ↗
(block, fallback)

Source from the content-addressed store, hash-verified

334}
335
336function detectChildIndent(block, fallback) {
337 const lines = block.split(/\r?\n/).reverse();
338 for (const line of lines) {
339 const match = line.match(/^(\s*)["'][^"']+["'],?\s*$/);
340 if (match) {
341 return match[1];
342 }
343 }
344 return fallback;
345}
346
347function findFallbackChildren(block, fallbackGroup) {
348 const textPattern = new RegExp(`\\btext\\s*:\\s*["']${escapeRegExp(fallbackGroup)}["']`, "g");

Callers 1

appendMissingEntriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected