vscode-markdown-languageservice icon indicating copy to clipboard operation
vscode-markdown-languageservice copied to clipboard

"No link definition found" for footnotes

Open dtinth opened this issue 3 years ago • 3 comments

When I use footnotes^fn1, the language server generates a warning.

image

Here’s a repro, put this is src/test/diagnostic.test.ts:

	test('Should not generate diagnostic for valid footnotes', withStore(async (store) => {
		const doc = new InMemoryDocument(workspacePath('doc.test.md'), joinLines(
			`footnotes should work[^fn1]`,
			``,
			`[^fn1]: this is a footnote`,
		));

		const workspace = store.add(new InMemoryWorkspace([doc]));

		const diagnostics = await getComputedDiagnostics(store, doc, workspace);
		assertDiagnosticsEqual(diagnostics, []);
	}));

dtinth avatar Jul 24 '22 19:07 dtinth

Footnotes aren't part of CommonMark so this is expected

They are common enough that I'd be open to adding support for them, but that should be something the library consumer has to opt into

mjbvz avatar Jul 25 '22 22:07 mjbvz

I second that, footnotes are awesome and it'd be great for vscode markdown services to parse them accordingly

hellt avatar Oct 14 '22 09:10 hellt

+ my vote for footnotes

mail2nnv avatar Dec 02 '22 13:12 mail2nnv