Skip to content

Commit e671812

Browse files
committed
Fixes
1 parent 4bf5e85 commit e671812

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/completion.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,11 @@ export class SelectorCompletionItemProvider implements CompletionItemProvider, D
250250
let value;
251251

252252
while ((value = findSelector.exec(attribute[3])) !== null) {
253-
const anchor = findSelector.lastIndex + offset;
254-
const end = document.positionAt(anchor);
255-
const start = document.positionAt(anchor - value[1].length);
256-
257253
if (!(attribute[1] === "id" ? context.ids : context.classes).has(value[1])) {
254+
const anchor = findSelector.lastIndex + offset;
255+
const end = document.positionAt(anchor);
256+
const start = document.positionAt(anchor - value[1].length);
257+
258258
diagnostics.push(new Diagnostic(new Range(start, end),
259259
`CSS selector '${value[1]}' not found.`,
260260
DiagnosticSeverity.Information));

0 commit comments

Comments
 (0)