diff options
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/markdown-language-features/src/languageFeatures/documentLinkProvider.ts | 2 | ||||
-rw-r--r-- | extensions/markdown-language-features/src/test/documentLinkProvider.test.ts | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/extensions/markdown-language-features/src/languageFeatures/documentLinkProvider.ts b/extensions/markdown-language-features/src/languageFeatures/documentLinkProvider.ts index 650a4356f5c..156db7de13e 100644 --- a/extensions/markdown-language-features/src/languageFeatures/documentLinkProvider.ts +++ b/extensions/markdown-language-features/src/languageFeatures/documentLinkProvider.ts @@ -357,7 +357,7 @@ export class MdLinkProvider implements vscode.DocumentLinkProvider { linkStart = document.positionAt(offset); const line = document.lineAt(linkStart.line); // See if link looks like a checkbox - const checkboxMatch = line.text.match(/^\s*\-\s*\[x\]/i); + const checkboxMatch = line.text.match(/^\s*[\-\*]\s*\[x\]/i); if (checkboxMatch && linkStart.character <= checkboxMatch[0].length) { continue; } diff --git a/extensions/markdown-language-features/src/test/documentLinkProvider.test.ts b/extensions/markdown-language-features/src/test/documentLinkProvider.test.ts index b0f7b18cdd7..48306e7620d 100644 --- a/extensions/markdown-language-features/src/test/documentLinkProvider.test.ts +++ b/extensions/markdown-language-features/src/test/documentLinkProvider.test.ts @@ -318,12 +318,15 @@ suite('markdown.DocumentLinkProvider', () => { const links = await getLinksForFile(joinLines( '- [x]', '- [X]', - '- []', + '- [ ]', + '* [x]', + '* [X]', + '* [ ]', ``, `[x]: http://example.com` )); assert.strictEqual(links.length, 1); - assertRangeEqual(links[0].range, new vscode.Range(4, 5, 4, 23)); + assertRangeEqual(links[0].range, new vscode.Range(7, 5, 7, 23)); }); |