File tree Expand file tree Collapse file tree 3 files changed +2
-63
lines changed Expand file tree Collapse file tree 3 files changed +2
-63
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,9 @@ import {
19
19
get_all_ts_files ,
20
20
report ,
21
21
TsSqlPluginConfig ,
22
- trim_middle_comments ,
23
22
} from "./lib/utils" ;
24
23
import { make_fake_expression } from "./lib/make_fake_expression" ;
25
- import { directiveRegex , parseDirectives } from "./lib/directiveParser" ;
24
+ import { parseDirectives } from "./lib/directiveParser" ;
26
25
27
26
program
28
27
. option ( "-w, --watch" , `watch mode of cli` )
@@ -148,7 +147,7 @@ program
148
147
async function delintNode ( node : ts . TaggedTemplateExpression ) {
149
148
let query_configs = fake_expression ( node ) ;
150
149
for ( const qc of query_configs ) {
151
- let s : string = trim_middle_comments ( qc . text ) . replace ( / \? \? / gm, plugin_config . mock ) ;
150
+ let s : string = qc . text . replace ( / \? \? / gm, plugin_config . mock ) ;
152
151
153
152
const directives = parseDirectives ( s ) ;
154
153
if ( cli_config . emit_dir ) {
Original file line number Diff line number Diff line change @@ -121,18 +121,3 @@ export type SchemaInfo = {
121
121
column : string ;
122
122
id : number ;
123
123
} [ ] ;
124
-
125
- export const trim_middle_comments = ( q : string ) => {
126
- let isHeadComment = true ;
127
- return q
128
- . trim ( )
129
- . split ( "\n" )
130
- . filter ( l =>
131
- l . trim ( ) . match ( / ^ \- \- / ) || l . trim ( ) . match ( / ^ \/ \* .* \* \/ $ / )
132
- ? isHeadComment
133
- ? true
134
- : false
135
- : ( ( isHeadComment = false ) , true ) ,
136
- )
137
- . join ( "\n" ) ;
138
- } ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments