File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -251,16 +251,18 @@ export function parseStatement(editor: vscode.TextEditor): StatementInfo {
251
251
if ( group ) {
252
252
content = text . substring ( group . range . start , group . range . end ) ;
253
253
editor . selection = new vscode . Selection ( editor . document . positionAt ( group . range . start ) , editor . document . positionAt ( group . range . end ) ) ;
254
+ }
255
+ }
254
256
255
- [ `cl` , `json` , `csv` , `sql` ] . forEach ( mode => {
256
- if ( content . trim ( ) . toLowerCase ( ) . startsWith ( mode + `:` ) ) {
257
- content = content . substring ( mode . length + 1 ) . trim ( ) ;
257
+ if ( content ) {
258
+ [ `cl` , `json` , `csv` , `sql` ] . forEach ( mode => {
259
+ if ( content . trim ( ) . toLowerCase ( ) . startsWith ( mode + `:` ) ) {
260
+ content = content . substring ( mode . length + 1 ) . trim ( ) ;
258
261
259
- //@ts -ignore We know the type.
260
- type = mode ;
261
- }
262
- } ) ;
263
- }
262
+ //@ts -ignore We know the type.
263
+ type = mode ;
264
+ }
265
+ } ) ;
264
266
}
265
267
266
268
return {
You can’t perform that action at this time.
0 commit comments