mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
fix(v2): unbreak blog-only mode routing by deplicating starting forward slashes (#2497)
This commit is contained in:
parent
d1326cdee8
commit
da7fd1a186
2 changed files with 7 additions and 0 deletions
|
@ -256,6 +256,9 @@ export function normalizeUrl(rawUrls: string[]): string {
|
|||
// Dedupe forward slashes in the entire path, avoiding protocol slashes.
|
||||
str = str.replace(/([^:]\/)\/+/g, '$1');
|
||||
|
||||
// Dedupe forward slashes at the beginning of the path.
|
||||
str = str.replace(/^\/+/g, '/');
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue