MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / extractBody

Function extractBody

tests/unit/services/MdbaseSpecService.test.ts:20–23  ·  view source on GitHub ↗

Extract the markdown body (after the closing ---)

(markdown: string)

Source from the content-addressed store, hash-verified

18
19/** Extract the markdown body (after the closing ---) */
20function extractBody(markdown: string): string {
21 const match = markdown.match(/^---\n[\s\S]*?\n---\n([\s\S]*)$/);
22 return match ? match[1] : "";
23}
24
25/** Parse a simple YAML key at root level (returns raw string value) */
26function getYamlValue(yaml: string, key: string): string | undefined {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected