Skip to content

Using Shiki-Twoslash #186

Answered by ChristianMurphy
mattcroat asked this question in Q&A
Mar 17, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

From https://github.com/shikijs/twoslash/blob/4c6416670553b61074cd33be0f3bb0fed64d0ada/packages/twoslash-cli/index.js#L143 I gather they are probably working on raw HTML text embedded in the markdown.
If that assumption is correct:

  1. add the allow dangerous HTML option to remark rehype https://github.com/remarkjs/remark-rehype#optionsallowdangeroushtml
  2. Convert the raw text into something that can be stringified either by:

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mattcroat
Comment options

@ChristianMurphy
Comment options

Answer selected by mattcroat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants