Skip to content

Commit cdaf47d

Browse files
Update regex to fbetter limit predicates found
1 parent 59a11f2 commit cdaf47d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

extensions/ql-vscode/src/CodeLensProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ class MyCodeLensProvider implements CodeLensProvider {
1515

1616
for (let index = 0; index < document.lineCount; index++) {
1717
const textLine = document.lineAt(index);
18-
const regex = new RegExp(/(?=(\w+\(\s*.*(?:,\s*)*\)))\1/g);
18+
const regex = new RegExp(/(?=(\w+\(\s*.*(?:,\s*)*\)\s*\{))\1/g);
1919
if (textLine.text.match(regex)) {
2020
const uri = document.uri;
2121
const startIndex = textLine.text.search(regex);
2222
const range: Range = new Range(
2323
textLine.range.start.line, startIndex,
24-
textLine.range.end.line, startIndex + 1
24+
textLine.range.end.line, startIndex - 1
2525
);
2626

2727
const command: Command = {

0 commit comments

Comments
 (0)