Update typescriptServiceClient.ts (#360)

This commit is contained in:
Calvin Huang 2022-03-26 16:42:53 -07:00 committed by GitHub
parent 6d598560c6
commit c5d9e07d3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -431,6 +431,9 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient
} }
public toResource(filepath: string): string { public toResource(filepath: string): string {
if (filepath.includes('zipfile:')) {
return filepath.replace(/.*zipfile:/, 'zipfile://');
}
if (this._apiVersion.gte(API.v213)) { if (this._apiVersion.gte(API.v213)) {
if (filepath.startsWith(this.inMemoryResourcePrefix + 'untitled:')) { if (filepath.startsWith(this.inMemoryResourcePrefix + 'untitled:')) {
let resource = Uri.parse(filepath) let resource = Uri.parse(filepath)