Skip to content

Commit c986b3a

Browse files
authored
Merge pull request #182 from integer32llc/hljs-class
Add hljs class to all code blocks, regardless of highlighting
2 parents f0c0d71 + 08b5d14 commit c986b3a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/theme/book.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ $( document ).ready(function() {
2222
$('code').each(function(i, block) {
2323
hljs.highlightBlock(block);
2424
});
25+
26+
// Adding the hljs class gives code blocks the color css
27+
// even if highlighting doesn't apply
28+
$('code').addClass('hljs');
2529

2630
var KEY_CODES = {
2731
PREVIOUS_KEY: 37,

0 commit comments

Comments
 (0)