diff --git a/extensions/markdown/src/documentLinkProvider.ts b/extensions/markdown/src/documentLinkProvider.ts index 1b922b43cef56..2e932e9ca4803 100644 --- a/extensions/markdown/src/documentLinkProvider.ts +++ b/extensions/markdown/src/documentLinkProvider.ts @@ -43,7 +43,7 @@ function matchAll(pattern: RegExp, text: string): Array { export default class LinkProvider implements vscode.DocumentLinkProvider { private linkPattern = /(\[[^\]]*\]\(\s*?)(((((?=.*\)\)+)|(?=.*\)\]+))[^\s\)]+?)|([^\s]+)))\)/g; private referenceLinkPattern = /(\[([^\]]+)\]\[\s*?)(\w*)\]/g; - private definitionPattern = /^([\t ]*\[(\w+)\]:\s*)(\S+)/gm; + private definitionPattern = /^([\t ]*\[([^\]]+)\]:\s*)(\S+)/gm; public provideDocumentLinks( document: vscode.TextDocument,