add testing suite

This commit is contained in:
2026-02-21 22:19:21 -05:00
parent 07128c3529
commit 83eee20b2c
25 changed files with 5317 additions and 1628 deletions
+10
View File
@@ -0,0 +1,10 @@
/** Strip markdown artifacts and normalize whitespace. Pure, no side effects. */
export function cleanText(str) {
if (!str) return "";
return str
.replace(/^#+\s*/gm, "")
.replace(/\*\*(.*?)\*\*/g, "$1")
.replace(/[*_`]/g, "")
.replace(/\s+/g, " ")
.trim();
}