fix unicode string matching to use string.normalize().

This commit is contained in:
Ryo KOBAYASHI 2025-12-20 14:01:21 +09:00
parent 9c042dd717
commit 64729211d1

View File

@ -241,7 +241,7 @@ export function transformLink(src: FullSlug, target: string, opts: TransformOpti
const matchingFileNames = opts.allSlugs.filter((slug) => { const matchingFileNames = opts.allSlugs.filter((slug) => {
const parts = slug.split("/") const parts = slug.split("/")
const fileName = parts.at(-1) const fileName = parts.at(-1)
return targetCanonical === fileName return targetCanonical.normalize() === fileName.normalize()
}) })
// only match, just use it // only match, just use it