You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing package documents with Vitepress + @shikijs/vitepress-twoslash, which makes the readability of code blocks much higher. I set explicitTrigger to false to enable Twoslash for all code blocks.
But when I integrate TypeDoc + typedoc-plugin-markdown into it, some errors occurred since TypeDoc renders @default to code blocks, which may not strictly follow TS syntax.
For example, when writing
classUser{/** Username. */name: string/** * User identity in urls. * @default this.name */handle: string// ...}
Anyone knows it meaning. However, Twoslash is not able to recognize what this actually refers to.
If code blocks' position can be passed to the filter option, it'll be easy to avoid the trouble.
The text was updated successfully, but these errors were encountered:
That would surely be helpful - but I guess that markdown-it's highlight function does not pass in which file it is - if you can figure out a solution, I am happy to have it! PR welcome!
Background:
I'm writing package documents with Vitepress +
@shikijs/vitepress-twoslash
, which makes the readability of code blocks much higher. I setexplicitTrigger
tofalse
to enable Twoslash for all code blocks.But when I integrate TypeDoc +
typedoc-plugin-markdown
into it, some errors occurred since TypeDoc renders@default
to code blocks, which may not strictly follow TS syntax.For example, when writing
Anyone knows it meaning. However, Twoslash is not able to recognize what
this
actually refers to.If code blocks' position can be passed to the
filter
option, it'll be easy to avoid the trouble.The text was updated successfully, but these errors were encountered: