fix: preserve dots in filenames during handelize

The handelize() regex replaced all non-letter/non-number chars with
dashes, including dots in the filename stem. This mangled session
filenames like "topic-1773595309.753009.md" to "topic-1773595309-753009.md",
breaking memory_get path resolution (file not found on disk).

Fix: add dot to the preserved character class in the filename regex.
After deploying, run qmd-reindex.sh to rebuild indexes with correct paths.
This commit is contained in:
Alexei Ledenev 2026-03-26 22:11:07 +02:00
parent 2b8f329d7e
commit ddecde78da
No known key found for this signature in database
GPG Key ID: 252AC4F84DC100FA

View File

@ -1610,7 +1610,7 @@ export function handelize(path: string): string {
const nameWithoutExt = ext ? segment.slice(0, -ext.length) : segment;
const cleanedName = nameWithoutExt
.replace(/[^\p{L}\p{N}$]+/gu, '-') // Keep route marker "$", dash-separate other chars
.replace(/[^\p{L}\p{N}.$]+/gu, '-') // Keep letters, numbers, dots, "$"; dash-separate rest
.replace(/^-+|-+$/g, ''); // Remove leading/trailing dashes
return cleanedName + ext;