MCPcopy
hub / github.com/colinhacks/zod / readCodeFence

Function readCodeFence

packages/docs/content/api.test.ts:166–180  ·  view source on GitHub ↗
(lines: SourceLine[], fenceStartIndex: number, startLine: number)

Source from the content-addressed store, hash-verified

164}
165
166function readCodeFence(lines: SourceLine[], fenceStartIndex: number, startLine: number): CodeFence {
167 let lineCount = 0;
168
169 for (let index = fenceStartIndex + 1; index < lines.length; index++) {
170 const line = lines[index];
171
172 if (!line || line.text.trimStart().startsWith("```")) {
173 break;
174 }
175
176 lineCount += 1;
177 }
178
179 return { startLine, lineCount };
180}
181
182function assertExpectedTabLabels(block: TabsBlock, failures: string[]): void {
183 const hasZodishTab = block.tabs.some((tab) => isLikelyTabValue(tab.value, "Zod"));

Callers 1

extractTabsBlocksFunction · 0.85

Calls 1

startsWithMethod · 0.65

Tested by

no test coverage detected