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

@@ -65,6 +65,14 @@ suite('markdown.DocumentLinkProvider', () => {
}
});
test('Should detect links with title', () => {
const links = getLinksForFile('a [b](https://example.com "abc") c');
assert.strictEqual(links.length, 1);
const [link] = links;
assertRangeEqual(link.range, new vscode.Range(0, 6, 0, 25));
});
test('Should handle links with balanced parens', () => {
{
const links = getLinksForFile('a [b](https://example.com/a()c) c');