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 find twoslash enabled doc to be really helpful when reading typescript projects that use them in their docs. I have been working on a few personal projects that use shiki for syntax highlighting some python files. I saw that there was a twoslash protocol that was created (#17 (comment)) to allow for things other than the typescript language server to generate the info that twoslash needs to render it. I was wondering what the steps would be to get the data generated into twoslash for rendering in to shiki?
Also if i wanted to include the docstrings for the nodes would I need to convert them into the jsdoc equivalents or what format do the strings of the types bellow need to be?
How much is the difference between Python's doc strings and jsodc? You do not have to convert them into jsdocs, it's just a data field and it's up to the renderer to parse the string to DOM. So it's possible that you provide your own patched renderer or so to render directly with docstring.
Python has several different docstring standards so it is a little less unified. However their plugins for sphinx that complice them into structured data that is more standardized that I could pass to a patched renderer like you suggested
I find twoslash enabled doc to be really helpful when reading typescript projects that use them in their docs. I have been working on a few personal projects that use shiki for syntax highlighting some python files. I saw that there was a twoslash protocol that was created (#17 (comment)) to allow for things other than the typescript language server to generate the info that twoslash needs to render it. I was wondering what the steps would be to get the data generated into twoslash for rendering in to shiki?
Also if i wanted to include the docstrings for the nodes would I need to convert them into the jsdoc equivalents or what format do the strings of the types bellow need to be?
twoslash/packages/twoslash-protocol/src/types/nodes.ts
Lines 15 to 25 in fcc9074
The text was updated successfully, but these errors were encountered: