mirror of
https://git.adityakumar.xyz/hugo-theme-even.git
synced 2024-11-09 14:59:45 +00:00
parent
e94d9b17e4
commit
af108c4ad5
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@ Even.chroma = function() {
|
||||||
const blocks = document.querySelectorAll('.highlight > .chroma');
|
const blocks = document.querySelectorAll('.highlight > .chroma');
|
||||||
for (let i = 0; i < blocks.length; i++) {
|
for (let i = 0; i < blocks.length; i++) {
|
||||||
const block = blocks[i];
|
const block = blocks[i];
|
||||||
const afterHighLight = block.querySelector('pre.chroma > code');
|
const afterHighLight = block.querySelector('pre.chroma > code[data-lang]');
|
||||||
const lang = afterHighLight ? afterHighLight.className : '';
|
const lang = afterHighLight ? afterHighLight.className : '';
|
||||||
block.className += ' ' + lang;
|
block.className += ' ' + lang;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue