Question: combining Twoslash with diff fences to show patch + tooltips #403
Replies: 2 comments
|
Hello! We are moving feature requests and support questions to discussions and using issues only for bugs to help better track those going forward. See you in the Discussions tab! |
|
Hey @schickling I am a Maintainer of the Twoslash's core function is to run a TypeScript language server against a single, self-contained code sample and use special comments (e.g., Given this information, the only solution would be a custom plugin that could take the source data and construct the EC annotations based on provided data similar to what EC-Twoslash is doing under the hood with the Twoslash and Typescript engines (converting from Typescript compiler data into Twoslash annotation then into EC compatible annotations) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
We use expressive-code-twoslash (via astro-expressive-code) and want to reuse Markdown diff fences/unified patch syntax while still getting Twoslash tooltips/diagnostics. Twoslash expects valid TS/JS and fails on diff fences, so we currently have to generate diffs ourselves and render three panels (Diff without Twoslash + Before/After with Twoslash).
Question
Context
Filed on behalf of @schickling via agent assistance.
All reactions