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

Function getTabValue

packages/docs/content/api.test.ts:155–164  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

153}
154
155function getTabValue(line: string): string | undefined {
156 const quotedValue = line.match(/<Tab\b[^>]*\bvalue\s*=\s*(["'])(.*?)\1/);
157
158 if (quotedValue?.[2]) {
159 return quotedValue[2];
160 }
161
162 const expressionValue = line.match(/<Tab\b[^>]*\bvalue\s*=\s*\{\s*(["'])(.*?)\1\s*\}/);
163 return expressionValue?.[2];
164}
165
166function readCodeFence(lines: SourceLine[], fenceStartIndex: number, startLine: number): CodeFence {
167 let lineCount = 0;

Callers 1

extractTabsBlocksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected