And above setting works as expected when wikilens is disabled:
However, when wikilens is enabled, the markdown preview is not showing for the files that have links to another markdowns!
stack trace: TypeError: Cannot read properties of undefined (reading 'document')
at Object.replace (c:\Users\tharindusathis\.vscode\extensions\lostintangent.wikilens-0.0.5\dist\extension.js:2:399312)
at t.rendererRule (c:\Users\tharindusathis\.vscode\extensions\lostintangent.wikilens-0.0.5\dist\extension.js:2:12103)
at Object.e.renderer.rules.<computed> [as wikilens-links] (c:\Users\tharindusathis\.vscode\extensions\lostintangent.wikilens-0.0.5\dist\extension.js:2:12699)
at s.renderInline (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1257228)
at s.render (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1257632)
at t.MarkdownEngine.render (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1362679)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async t.MarkdownContentProvider.markdownBody (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1383181)
at async t.MarkdownContentProvider.provideTextDocumentContent (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1382250)
at async m.updatePreview (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1371304)
mainThreadExtensionService.ts:79 [[object Object]]Cannot read properties of undefined (reading 'document')
TypeError: Cannot read properties of undefined (reading 'document')
at Object.replace (c:\Users\tharindusathis\.vscode\extensions\lostintangent.wikilens-0.0.5\dist\extension.js:2:399312)
at t.rendererRule (c:\Users\tharindusathis\.vscode\extensions\lostintangent.wikilens-0.0.5\dist\extension.js:2:12103)
at Object.e.renderer.rules.<computed> [as wikilens-links] (c:\Users\tharindusathis\.vscode\extensions\lostintangent.wikilens-0.0.5\dist\extension.js:2:12699)
at s.renderInline (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1257228)
at s.render (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1257632)
at t.MarkdownEngine.render (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1362679)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async t.MarkdownContentProvider.markdownBody (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1383181)
at async t.MarkdownContentProvider.provideTextDocumentContent (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1382250)
at async m.updatePreview (c:\Users\tharindusathis\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:1371304)
And after removing the setting mentioned at top the preview and extension works as expected:
These are the two md files that I have shown above:
According to this SO question, to make VS Code preview markdown by default, I added the following settings:
And above setting works as expected when wikilens is disabled:
However, when wikilens is enabled, the markdown preview is not showing for the files that have links to another markdowns!
And after removing the setting mentioned at top the preview and extension works as expected:
These are the two md files that I have shown above:
parent.md:
child1.md: