From 281d93af53de6e7a26899e37cf6db89cbf67e6f4 Mon Sep 17 00:00:00 2001 From: mbehzad Date: Thu, 12 Sep 2024 16:09:09 +0200 Subject: [PATCH] fix(vscode-pv-handlebars-language-server): add support for ui and events info fix duplicate reports when the tag matched --- .../server/src/codelensProvider.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/vscode-pv-handlebars-language-server/server/src/codelensProvider.ts b/packages/vscode-pv-handlebars-language-server/server/src/codelensProvider.ts index b4c3bc3..b31ff5d 100644 --- a/packages/vscode-pv-handlebars-language-server/server/src/codelensProvider.ts +++ b/packages/vscode-pv-handlebars-language-server/server/src/codelensProvider.ts @@ -70,7 +70,9 @@ export async function codelensProvider(textDocument: TextDocument) { .split(" ") // check if one is the same as the ui selector .includes(selector.replace(/^./, "")); - const tagMatch = match.groups!.tagName === selector; + + // ignore the tag matches for the classNames rgx because it is already catch by the tags rgx already. + const tagMatch = !("className" in match.groups!) && match.groups!.tagName === selector; if (classMatch || tagMatch) { const line = content.substring(0, match.index).split("\n").length - 1;