@@ -62,16 +62,16 @@ export interface ConnectionTarget {
6262 * @param workspace The workspace the file is in.
6363 */
6464function getServerDocName ( localPath : string , workspace : string ) : string {
65- var result = localPath ;
65+ let result = localPath ;
6666 const workspacePath = workspaceFolderUri ( workspace ) . fsPath ;
67- result = result . replace ( workspacePath + path . sep , '' ) ;
67+ result = result . replace ( workspacePath + path . sep , "" ) ;
6868 const { folder, addCategory } = config ( "export" , workspace ) ;
69- result = result . replace ( folder + path . sep , '' ) ;
69+ result = result . replace ( folder + path . sep , "" ) ;
7070 const cat = addCategory ? getCategory ( localPath , addCategory ) : null ;
7171 if ( cat !== null ) {
72- result = result . replace ( cat + path . sep , '' ) ;
72+ result = result . replace ( cat + path . sep , "" ) ;
7373 }
74- return result . replace ( path . sep , "/" ) ;
74+ return result . replace ( path . sep , "/" ) ;
7575}
7676
7777/**
@@ -80,11 +80,11 @@ function getServerDocName(localPath: string, workspace: string): string {
8080 * @param file The file to check.
8181 */
8282export function isImportableLocalFile ( file : vscode . TextDocument ) : boolean {
83- var result = false ;
83+ let result = false ;
8484 const workspace = currentWorkspaceFolder ( file ) ;
8585 const workspacePath = workspaceFolderUri ( workspace ) . fsPath ;
8686 const { folder, addCategory } = config ( "export" , workspace ) ;
87- const filePathNoWorkspaceArr = file . fileName . replace ( workspacePath + path . sep , '' ) . split ( path . sep ) ;
87+ const filePathNoWorkspaceArr = file . fileName . replace ( workspacePath + path . sep , "" ) . split ( path . sep ) ;
8888 const cat = addCategory ? getCategory ( file . fileName , addCategory ) : null ;
8989 if ( filePathNoWorkspaceArr [ 0 ] === folder ) {
9090 if ( cat === null || ( cat !== null && filePathNoWorkspaceArr [ 1 ] === cat ) ) {
@@ -142,9 +142,8 @@ export function currentFile(document?: vscode.TextDocument): CurrentFile {
142142 }
143143 } else {
144144 if ( document . uri . scheme === "file" ) {
145- name = getServerDocName ( fileName , currentWorkspaceFolder ( document ) ) ;
146- }
147- else {
145+ name = getServerDocName ( fileName , currentWorkspaceFolder ( document ) ) ;
146+ } else {
148147 name = fileName ;
149148 }
150149 // Need to strip leading / for custom Studio documents which should not be treated as files.
0 commit comments