mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-23 03:56:23 +00:00
fix(slug): Handle question mark (#481)
This commit is contained in:
parent
7ac772fca8
commit
af41f34bfd
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ export function slugifyFilePath(fp: FilePath, excludeExt?: boolean): FullSlug {
|
||||||
|
|
||||||
let slug = withoutFileExt
|
let slug = withoutFileExt
|
||||||
.split("/")
|
.split("/")
|
||||||
.map((segment) => segment.replace(/\s/g, "-").replace(/%/g, "-percent")) // slugify all segments
|
.map((segment) => segment.replace(/\s/g, "-").replace(/%/g, "-percent").replace(/\?/g, "-q")) // slugify all segments
|
||||||
.join("/") // always use / as sep
|
.join("/") // always use / as sep
|
||||||
.replace(/\/$/, "") // remove trailing slash
|
.replace(/\/$/, "") // remove trailing slash
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue