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
👋 Hello. Firstly, thank you for shiki-twoslash. It's amazing.
I'd like to post this as a humble feature request.
Problem
Knowing the language of the code snippet in CSS may be quite useful in a few cases.
AFAIK it's not possible right now with remark-shiki-twoslash without a second pass with a rehype plugin?
Possible Solution
The remark plugin could accept a configuration option to set attributes of the pre element at the root of the code block.
This would later be used in preOpenerFromRenderingOptsWithExtras in shiki-twoslash.
Workaround
I used pnpm patch to quickly add opts.langId to the classList in preOpenerFromRenderingOptsWithExtras.
👋 Hello. Firstly, thank you for
shiki-twoslash
. It's amazing.I'd like to post this as a humble feature request.
Problem
Knowing the language of the code snippet in CSS may be quite useful in a few cases.
AFAIK it's not possible right now with
remark-shiki-twoslash
without a second pass with a rehype plugin?Possible Solution
The remark plugin could accept a configuration option to set attributes of the
pre
element at the root of the code block.This would later be used in
preOpenerFromRenderingOptsWithExtras
inshiki-twoslash
.Workaround
I used
pnpm patch
to quickly addopts.langId
to theclassList
inpreOpenerFromRenderingOptsWithExtras
.twoslash/packages/shiki-twoslash/src/renderers/plain.ts
Lines 12 to 18 in eb286da
The text was updated successfully, but these errors were encountered: