Properly handle links with title

This commit is contained in:
Matt Bierner
2018-05-04 11:37:20 -07:00
parent 43ed87ccde
commit 7980812a43
2 changed files with 9 additions and 1 deletions

View File

@@ -47,7 +47,7 @@ function matchAll(
}
export default class LinkProvider implements vscode.DocumentLinkProvider {
private readonly linkPattern = /(\[[^\]]*\]\(\s*)((([^\s\(\)]|\(\S*?\))+))\)/g;
private readonly linkPattern = /(\[[^\]]*\]\(\s*)((([^\s\(\)]|\(\S*?\))+))\s*(".*?")?\)/g;
private readonly referenceLinkPattern = /(\[([^\]]+)\]\[\s*?)([^\s\]]*?)\]/g;
private readonly definitionPattern = /^([\t ]*\[([^\]]+)\]:\s*)(\S+)/gm;