(uri: string)
| 114 | * @internal |
| 115 | */ |
| 116 | export function encodeURIPath(uri: string): string { |
| 117 | if (uri.startsWith('data:')) { |
| 118 | return uri; |
| 119 | } |
| 120 | const filePath = cleanUrl(uri); |
| 121 | const postfix = filePath !== uri ? uri.slice(filePath.length) : ''; |
| 122 | return encodeURI(filePath) + postfix; |
| 123 | } |
no test coverage detected