mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-02-03 22:15:42 -06:00
fix(ParentBreadcrumbs): Correctly find parent
Used to use endsWith, which would sometimes Partially match another file
This commit is contained in:
parent
598377cb44
commit
466994f698
@ -38,7 +38,11 @@ export default ((opts?: ParentBreadcrumbsOptions) => {
|
|||||||
const targetSlug = simplifySlug(name as FullSlug)
|
const targetSlug = simplifySlug(name as FullSlug)
|
||||||
return allFiles.find((f: QuartzPluginData) => {
|
return allFiles.find((f: QuartzPluginData) => {
|
||||||
const fSlug = simplifySlug(f.slug!)
|
const fSlug = simplifySlug(f.slug!)
|
||||||
return fSlug === targetSlug || fSlug.endsWith(targetSlug) || f.frontmatter?.title === name
|
return (
|
||||||
|
fSlug === targetSlug ||
|
||||||
|
fSlug.normalize() == targetSlug.normalize() ||
|
||||||
|
f.frontmatter?.title === name
|
||||||
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user