fix tests

This commit is contained in:
Giancarmine Salucci
2026-02-18 01:11:03 +01:00
parent bf3e5c679f
commit 54321fd7c9
5 changed files with 30 additions and 10 deletions

View File

@@ -234,6 +234,9 @@ export function cleanText(text: string): string {
// Remove spaces around newlines
cleaned = cleaned.replace(/ *\n */g, '\n');
// Normalize multiple spaces to single space within lines
cleaned = cleaned.replace(/ {2,}/g, ' ');
// Remove hashtags from end of text
// Pattern: #word #multiple_words (supports international characters)