mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-16 02:27:21 +02:00
fix(v2): doc path special char (space or other) should lead to a valid slug (#3262)
* doc path special char (space or other) should lead to a valid slug * doc path special char (space or other) should lead to a valid slug * improve doc bad slug message
This commit is contained in:
parent
b75a7150b2
commit
dd3f3f1093
4 changed files with 21 additions and 3 deletions
|
@ -394,10 +394,11 @@ describe('load utils', () => {
|
|||
expect(isValidPathname('/hey/ho/')).toBe(true);
|
||||
expect(isValidPathname('/hey/h%C3%B4/')).toBe(true);
|
||||
expect(isValidPathname('/hey///ho///')).toBe(true); // Unexpected but valid
|
||||
expect(isValidPathname('/hey/héllô you')).toBe(true);
|
||||
|
||||
//
|
||||
expect(isValidPathname('')).toBe(false);
|
||||
expect(isValidPathname('hey')).toBe(false);
|
||||
expect(isValidPathname('/hey/hô')).toBe(false);
|
||||
expect(isValidPathname('/hey?qs=ho')).toBe(false);
|
||||
expect(isValidPathname('https://fb.com/hey')).toBe(false);
|
||||
expect(isValidPathname('//hey')).toBe(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue