shikijs / shiki

A beautiful yet powerful syntax highlighter
http://shiki.style/
MIT License
9.19k stars 330 forks source link

Twoslash node query blocks (^?) no longer display on separate lines since 0.x #688

Closed mattpocock closed 4 weeks ago

mattpocock commented 1 month ago

Validations

Describe the bug

In 0.*, twoslash node query blocks (^?) were shown on a separate line, like here in the TypeScript docs.

image

In 1.*, they are shown with position: absolute over the top:

image

This appears to be a deliberate change to the renderer.

I can see the use cases for this new absolute positioning. But for my use cases (screenshotting and docs) I need the query blocks to be shown on a separate line to the nodes they target. A config option to go back to the old behavior would be appreciated.

I can see that rendererClassic is available for me, so I'm using that now - but a separate option to preserve the separate-line queries would be good.

Reproduction

No reproduction required, since Anthony described this is a deliberate change

Contributes