-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
I'm trying to move from prismjs to this plugin.
Everything works as expected except for inline code. I often use backticks to highlight some technical keywords.
With prismjs, inline code rendered as code. However, using gatsby-remark-vscode, It doesn't render using VS Theme, only a <code>
block is produced.
I'm aware of the inline code with marker syntax, but it has two problems (from my experience):
- there's no support for plaintext. Unless I missed something, plaintext is not a available language (though VSCode support this "language"). If I specify either
plaintext
ortext
, it won't compile (Cannot destructure property 'tokenTypes' of 'getGrammar(...)' as it is undefined.
). As a workaround I specifycmd
to produce a neutral color - full marker syntax is overkill for my case, supporting simple backticks should be processed bt this pluging.
For exemple, this markdown :
Basic inline : `inline`
Inline with marker : `cmd•inline`
Basic render
some code
Renders (styles removed):
<div>
<p>Basic inline : <code>inline</code></p>
<p>Inline with marker : <code class="dark-default-dark" data-language="cmd"
data-index="0"><span class="mtk1">inline</span></code></p>
<p>Basic render</p>
<pre class="grvsc-container dark-default-dark" data-language=""
data-index="0"><code class="grvsc-code"><span class="grvsc-line"><span class="grvsc-source">some code</span></span></code></pre>
</div>
visually:
As you can see, the "simple" backticks renders as a simple non styled code blocks.
I believe that :
- plaintext should be supported
- backticks without language marker should be processed using the default theme using the "plaintext" language
Did I missed something ? Is there a chance to enhance thise behavior ?
Metadata
Metadata
Assignees
Labels
No labels