Markdown reference links starting with ^ should not be clickable (#108015)

Co-authored-by: mmacovei <mmacovei@sfu.ca>
This commit is contained in:
Nafana
2020-10-07 23:38:17 -07:00
committed by GitHub
parent 57fc7c21ac
commit df59ceb026
2 changed files with 7 additions and 1 deletions

View File

@@ -105,7 +105,7 @@ function extractDocumentLink(
export default class LinkProvider implements vscode.DocumentLinkProvider {
private readonly linkPattern = /(\[((!\[[^\]]*?\]\(\s*)([^\s\(\)]+?)\s*\)\]|(?:\\\]|[^\]])*\])\(\s*)(([^\s\(\)]|\(\S*?\))+)\s*(".*?")?\)/g;
private readonly referenceLinkPattern = /(\[((?:\\\]|[^\]])+)\]\[\s*?)([^\s\]]*?)\]/g;
private readonly definitionPattern = /^([\t ]*\[((?:\\\]|[^\]])+)\]:\s*)(\S+)/gm;
private readonly definitionPattern = /^([\t ]*\[(?!\^)((?:\\\]|[^\]])+)\]:\s*)(\S+)/gm;
public provideDocumentLinks(
document: vscode.TextDocument,