-
|
Is this a bug? My JavaScript object literal is not syntax highlighted. The code works fine with Prism.js: https://prismjs.com/test.html#language=javascript This is my code: $('body').terminal({
hello(what = 'world') {
this.echo(`hello, this is ${what}!`);
},
bye() {
this.echo('goodby');
}
}, {
checkArity: false
});Even GitHub don't have issues highlighting this code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
If you look at the inspected DOM, you see that the tokens do get correct class names like |
Beta Was this translation helpful? Give feedback.

If you look at the inspected DOM, you see that the tokens do get correct class names like
operatorandboolean. However, the particular theme you've chosen does not give any of these tokens special colors. Either choose another theme, or enhance this theme, following our guide here: https://docusaurus.io/docs/markdown-features/code-blocks#theming