File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -43,17 +43,21 @@ export function currentFile(document?: vscode.TextDocument): CurrentFile {
43
43
if ( ! document ) {
44
44
return null ;
45
45
}
46
+ const fileName = document . fileName ;
47
+ const fileExt = fileName . split ( "." ) . pop ( ) . toLowerCase ( ) ;
46
48
if (
47
49
! schemas . includes ( document . uri . scheme ) &&
48
- ( ! document || ! document . fileName || ! document . languageId || ! document . languageId . startsWith ( "objectscript" ) )
50
+ ( ! document ||
51
+ ! document . fileName ||
52
+ ! document . languageId ||
53
+ ! document . languageId . startsWith ( "objectscript" ) ||
54
+ fileExt . match ( / ( c s p ) / i) ) // Skip CSP for now, yet
49
55
) {
50
56
return null ;
51
57
}
52
58
const eol = document . eol || vscode . EndOfLine . LF ;
53
59
const uri = document . uri ;
54
- const fileName = document . fileName ;
55
60
const content = document . getText ( ) ;
56
- const fileExt = fileName . split ( "." ) . pop ( ) . toLowerCase ( ) ;
57
61
let name = "" ;
58
62
let ext = "" ;
59
63
const { query } = url . parse ( decodeURIComponent ( uri . toString ( ) ) , true ) ;
You can’t perform that action at this time.
0 commit comments