Skip to content

Commit

Permalink
Prevent document links from accidentally being resolved to your entir…
Browse files Browse the repository at this point in the history
…e document (#639)
  • Loading branch information
DaelonSuzuka authored Apr 17, 2024
1 parent a9508d9 commit 019d87e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/document_link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class GDDocumentLinkProvider implements DocumentLinkProvider {
links.push(link);
}
}
for (const match of text.matchAll(/res:\/\/[^"^']*/g)) {
for (const match of text.matchAll(/res:\/\/([^"'\n]*)/g)) {
const r = this.create_range(document, match);
const uri = await convert_resource_path_to_uri(match[0]);
if (uri instanceof Uri) {
Expand Down

0 comments on commit 019d87e

Please sign in to comment.