-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
auto-generatedAutomatically generated contentAutomatically generated contentclaude-codeItems created or modified by Claude CodeItems created or modified by Claude Code
Description
We want to add a new utility to the Markdown utilities that will extract the entire section of a Markdown file based off the header below is an example implementation. Go ahead and add this or something like this and then add the tests as well using the UVU framework.
function extractSection(content: string, sectionTitle: string): string | undefined {
const regex = new RegExp(`## ${sectionTitle}\\s*\\n([\\s\\S]*?)(?=\\n## |$)`, "i");
const match = content.match(regex);
return match?.[1]?.trim();
}
Metadata
Metadata
Assignees
Labels
auto-generatedAutomatically generated contentAutomatically generated contentclaude-codeItems created or modified by Claude CodeItems created or modified by Claude Code