Skip to content

Use theme foreground color when color of token is undefined #27

Description

@jackens
const main = async () => {
  const shiki = require('shiki')
  const highlighter = await shiki.getHighlighter({ theme: 'monokai' })
  const code = 'whatever'
  const lang = 'txt'
  console.log(highlighter.codeToHtml(code, lang))
}

main()

generates

<pre class="shiki" style="background-color: #272822"><code><span style="color: undefined">whatever</span></code></pre>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions