#!/usr/bin/env bun /** * Strips truncated/orphan `` (missing closing -->). next = next.replace(/[ \t]*")) return m; return ""; }); return next; } function main(): void { const files = walkMd("packages"); let changed = 0; for (const file of files) { const src = readFileSync(file, "utf8"); const next = clean(src); if (next !== src) { writeFileSync(file, next); changed++; } } console.log(`Cleaned ${changed} .md files.`); } main();