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 {
4343 if ( ! document ) {
4444 return null ;
4545 }
46+ const fileName = document . fileName ;
47+ const fileExt = fileName . split ( "." ) . pop ( ) . toLowerCase ( ) ;
4648 if (
4749 ! 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
4955 ) {
5056 return null ;
5157 }
5258 const eol = document . eol || vscode . EndOfLine . LF ;
5359 const uri = document . uri ;
54- const fileName = document . fileName ;
5560 const content = document . getText ( ) ;
56- const fileExt = fileName . split ( "." ) . pop ( ) . toLowerCase ( ) ;
5761 let name = "" ;
5862 let ext = "" ;
5963 const { query } = url . parse ( decodeURIComponent ( uri . toString ( ) ) , true ) ;
You can’t perform that action at this time.
0 commit comments