(rehype-highlight) How do I register a language and alias it so that it replaces a built-in lanugage #110
Unanswered
NullVoxPopuli
asked this question in
Q&A
Replies: 2 comments 3 replies
-
|
I’m not sure how to do that with |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a hi-fi highlighter over at highlight.js-glimmer -- where, Glimmer is a superset of both HTML and Handlebars (syntactically), and for my purposes, I would like to use my highlighter instead of the handlebars one when I parse markdown files with hbs-tagged cofedences.
I have a test that I'm running with vitest, atm, and I'm noticing that the language identification is incorrect:
the entirety of my test is here:
But here is the output:
- <pre><code class="hljs language-glimmer"> <span class="hljs-punctuation mustache">{{<span class="hljs-punctuation">@</span><span class=… + "<pre><code class="hljs language-hbs"> <span class="hljs-punctuation mustache">{{<span class="hljs-punctuation">@</span><span class="hlj… </code></pre>the I'm getting
language-hbsinstead oflanguage-glimmer.Is this a bug?
Here are my versions:
I have a PR where I'm updating a bunch of stuff, since it's been a while NullVoxPopuli/highlightjs-glimmer#218
And I've pulled that into codesandbox here: https://codesandbox.io/s/github/NullVoxPopuli/highlightjs-glimmer/tree/updates
but codesandbox appears broken
Beta Was this translation helpful? Give feedback.
All reactions