INNER CODE UNIT · TypeScript
match
winstonkoh87/Athena-Public · supabase/functions/sync-athena/index.ts:87
const match = filename.match(/(\d{4}-\d{2}-\d{2})-session-(\d+)\.md/);
if (match) {
return { date: match[1], sessionNum: parseInt(match[2]) };
}
return null;
}
// Extract title from markdown
function extractTitle(content: string): string {
const lines = content.split("\n");
for (const line of lines) {
if (line.startsWith("# ")) {
return line.slice(2).trim();
}
}
return "Untitled";
}