shikijs / twoslash

You take some Shiki, add a hint of TypeScript compiler, and 🎉 incredible static code samples
https://shikijs.github.io/twoslash/
MIT License
1.06k stars 51 forks source link

[remark-shiki-twoslash] Code block without a language adds "undefined" style #150

Closed filipsobol closed 2 years ago

filipsobol commented 2 years ago

I use Markdown code blocks to show a project file tree like so:

routes/
├─ company/
│  ├─ about_us.vue
├─ home.vue
```


I don't specify the language on the first line because there is none used and I don't want to apply any styling. In such cases `<span>` element wrapping this text will have `style="color: undefined;"`.

In most cases this is not a problem, because browsers will simply ignore it. However, I'm creating a Vue.js component from remark output and it's causing some issues (out of scope of this package).

Would it be possible to not apply styles, when they are `undefined`?