This repository was archived by the owner on Jul 31, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ export class GraphQLCodeLensProvider implements CodeLensProvider {
29
29
return literals . map ( literal => {
30
30
return new CodeLens (
31
31
new Range (
32
- new Position ( literal . position . line + 1 , 0 ) ,
33
- new Position ( literal . position . line + 1 , 0 ) ,
32
+ new Position ( literal . position . line , 0 ) ,
33
+ new Position ( literal . position . line , 0 ) ,
34
34
) ,
35
35
{
36
36
title : `Execute ${ capitalize ( literal . definition . operation ) } ` ,
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ export class SourceHelper {
164
164
// https://regex101.com/r/Pd5PaU/2
165
165
const regExpGQL = new RegExp ( tag + "\\s*`([\\s\\S]+?)`" , "mg" )
166
166
167
- let result
167
+ let result : RegExpExecArray | null
168
168
while ( ( result = regExpGQL . exec ( text ) ) !== null ) {
169
169
const contents = result [ 1 ]
170
170
@@ -174,7 +174,7 @@ export class SourceHelper {
174
174
continue
175
175
}
176
176
try {
177
- processGraphQLString ( contents , result . index + 4 )
177
+ processGraphQLString ( contents , result . index + tag . length + 1 )
178
178
} catch ( e ) { }
179
179
}
180
180
} )
You can’t perform that action at this time.
0 commit comments