Skip to content

Commit

Permalink
fix(language-apidom): aprovide document links with non-empty ranges (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
char0n authored Apr 27, 2023
1 parent 46f48d5 commit 34a8eab
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ class DocumentLinkAdapter extends Adapter {

async provideDocumentLinks(vscodeDocument) {
const links = await this.#getLinks(vscodeDocument);
const linksWithNonEmptyRanges = links.filter(
(link) => !this.protocolConverter.asRange(link.range).isEmpty
);

return this.protocolConverter.asDocumentLinks(links);
return this.protocolConverter.asDocumentLinks(linksWithNonEmptyRanges);
}

// eslint-disable-next-line class-methods-use-this
Expand Down

0 comments on commit 34a8eab

Please sign in to comment.