Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

& instead of & #26

Closed
jackens opened this issue Feb 9, 2020 · 0 comments
Closed

& instead of & #26

jackens opened this issue Feb 9, 2020 · 0 comments
Labels
bug Something isn't working renderers

Comments

@jackens
Copy link
Contributor

jackens commented Feb 9, 2020

const main = async () => {
  const shiki = require('shiki')
  const highlighter = await shiki.getHighlighter({ theme: 'monokai' })
  const code = 'a & b > c'
  const lang = 'js'
  console.log(highlighter.codeToHtml(code, lang))
}

main()

generates

<pre class="shiki" style="background-color: #272822"><code><span style="color: #F8F8F2">a </span><span style="color: #F92672">&</span><span style="color: #F8F8F2"> b </span><span style="color: #F92672">&gt;</span><span style="color: #F8F8F2"> c</span></code></pre>

instead of

<pre class="shiki" style="background-color: #272822"><code><span style="color: #F8F8F2">a </span><span style="color: #F92672">&amp;</span><span style="color: #F8F8F2"> b </span><span style="color: #F92672">&gt;</span><span style="color: #F8F8F2"> c</span></code></pre>
@jackens jackens changed the title & instead of &amp; & instead of &amp; Feb 9, 2020
@octref octref added bug Something isn't working renderers labels Aug 5, 2020
@octref octref closed this as completed in 5715930 Aug 5, 2020
octref added a commit that referenced this issue Aug 5, 2020
antfu pushed a commit that referenced this issue Jan 26, 2024
antfu added a commit that referenced this issue Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working renderers
Projects
None yet
Development

No branches or pull requests

2 participants