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:
parent
2b8f329d7e
commit
ddecde78da
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user