mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-10 12:47:49 +00:00
account for root level paths
This commit is contained in:
@@ -130,6 +130,9 @@ export function printExecutionTime(commandName: string, startedAt: number, api:
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function pathToFilename(path: string, pathSeparator: string) {
|
export function pathToFilename(path: string, pathSeparator: string) {
|
||||||
|
if (path === '/') {
|
||||||
|
return 'root';
|
||||||
|
}
|
||||||
return path
|
return path
|
||||||
.replace(/~1/g, '/')
|
.replace(/~1/g, '/')
|
||||||
.replace(/~0/g, '~')
|
.replace(/~0/g, '~')
|
||||||
|
|||||||
Reference in New Issue
Block a user