MCPcopy Create free account
hub / github.com/backnotprop/plannotator / extractFirstHeading

Function extractFirstHeading

packages/shared/storage.ts:39–43  ·  view source on GitHub ↗

* Extract the first heading from markdown content.

(markdown: string)

Source from the content-addressed store, hash-verified

37 * Extract the first heading from markdown content.
38 */
39function extractFirstHeading(markdown: string): string | null {
40 const match = markdown.match(/^#\s+(.+)$/m);
41 if (!match) return null;
42 return match[1].trim();
43}
44
45/**
46 * Generate a slug from plan content.

Callers 1

generateSlugFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected