I tried using CSS to set a font family for highlighted code ,but it didn‘t work.
I was confused because it seems that there is not an official way to set a font family for highlightJS
When I using native highlightJS and <pre><code>, .hljs it works
/* a div contained a highlightjs component */
#box{
font-family: 'JetBrainsMono-Regular';
}
.highlightjs {
font-family: 'JetBrainsMono-Regular';
}
.hljs {
font-family: 'JetBrainsMono-Regular';
}