Skip to content

Commit f0916e1

Browse files
committed
(fix) documentLink.ts: non-greedy linkPattern
1 parent 7629501 commit f0916e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/language/documentLink.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export class DocumentLinkProvider implements DocumentLinkProvider {
66
async provideDocumentLinks(document: TextDocument, token: CancellationToken) {
77
const results: DocumentLink[] = [];
88
const text: string = document.getText();
9-
const linkPattern: RegExp = /(?<=['"]).*\.tpl(?=['"])/g;
9+
const linkPattern: RegExp = /(?<=['"])[^\s'"]+\.tpl(?=['"])/g;
1010

1111
for (let match: RegExpExecArray; match = linkPattern.exec(text); match) {
1212

0 commit comments

Comments
 (0)