浏览代码

Prevent document links from accidentally being resolved to your entire document (#639)

David Kincaid 1 年之前
父节点
当前提交
019d87e5c7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/providers/document_link.ts

+ 1 - 1
src/providers/document_link.ts

@@ -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) {