mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-01 22:48:14 +00:00
fix: sluggify pound (closes #681)
This commit is contained in:
parent
0a8c38dc21
commit
6babb788ed
2 changed files with 5 additions and 1 deletions
quartz/util
|
@ -50,7 +50,9 @@ export function getFullSlug(window: Window): FullSlug {
|
|||
function sluggify(s: string): string {
|
||||
return s
|
||||
.split("/")
|
||||
.map((segment) => segment.replace(/\s/g, "-").replace(/%/g, "-percent").replace(/\?/g, "-q")) // slugify all segments
|
||||
.map((segment) =>
|
||||
segment.replace(/\s/g, "-").replace(/%/g, "-percent").replace(/\?/g, "-q").replace(/#/g, ""),
|
||||
) // slugify all segments
|
||||
.join("/") // always use / as sep
|
||||
.replace(/\/$/, "")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue