mirror of
https://github.com/quartz-community/breadcrumbs.git
synced 2026-07-22 02:50:29 +00:00
fix: stop replacing dashes with spaces in breadcrumb display names
The replaceAll('-', ' ') in formatCrumb() was unnecessary since
FileTrieNode.displayName already resolves correctly via the priority chain.
This commit is contained in:
parent
fe32923b12
commit
b7b56d16fe
5 changed files with 5 additions and 5 deletions
2
dist/components/index.js
vendored
2
dist/components/index.js
vendored
|
|
@ -146,7 +146,7 @@ var defaultOptions = {
|
|||
};
|
||||
function formatCrumb(displayName, baseSlug, currentSlug) {
|
||||
return {
|
||||
displayName: displayName.replaceAll("-", " "),
|
||||
displayName,
|
||||
path: resolveRelative(baseSlug, currentSlug)
|
||||
};
|
||||
}
|
||||
|
|
|
|||
2
dist/components/index.js.map
vendored
2
dist/components/index.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js
vendored
2
dist/index.js
vendored
|
|
@ -146,7 +146,7 @@ var defaultOptions = {
|
|||
};
|
||||
function formatCrumb(displayName, baseSlug, currentSlug) {
|
||||
return {
|
||||
displayName: displayName.replaceAll("-", " "),
|
||||
displayName,
|
||||
path: resolveRelative(baseSlug, currentSlug)
|
||||
};
|
||||
}
|
||||
|
|
|
|||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -33,7 +33,7 @@ const defaultOptions: BreadcrumbOptions = {
|
|||
|
||||
function formatCrumb(displayName: string, baseSlug: string, currentSlug: string): CrumbData {
|
||||
return {
|
||||
displayName: displayName.replaceAll("-", " "),
|
||||
displayName,
|
||||
path: resolveRelative(baseSlug, currentSlug),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue