(content: string)
| 348 | } |
| 349 | |
| 350 | function extractFrontmatter(content: string): string | null { |
| 351 | // Supports both `---\n...\n---` (YAML) and `+++\n...\n+++` (TOML, rare). |
| 352 | const yamlMatch = content.match(/^---\s*\n([\s\S]*?)\n---\s*\n/); |
| 353 | if (yamlMatch) return yamlMatch[1]; |
| 354 | return null; |
| 355 | } |
| 356 | |
| 357 | function extractGbrainBlock(frontmatter: string): GbrainManifest | null { |
| 358 | // Naive YAML extraction — finds the `gbrain:` key and parses its sub-tree. |
no outgoing calls
no test coverage detected