Extract the markdown body (after the closing ---)
(markdown: string)
| 18 | |
| 19 | /** Extract the markdown body (after the closing ---) */ |
| 20 | function 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) */ |
| 26 | function getYamlValue(yaml: string, key: string): string | undefined { |
no outgoing calls
no test coverage detected