Skip to content

Commit

Permalink
fix(js): fix code blog title missing
Browse files Browse the repository at this point in the history
  • Loading branch information
sdvcrx committed Mar 18, 2020
1 parent f25d032 commit 54f27ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/even.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Even.chroma = function() {
const blocks = document.querySelectorAll('.highlight > .chroma');
for (let i = 0; i < blocks.length; 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 : '';
block.className += ' ' + lang;
}
Expand Down

0 comments on commit 54f27ee

Please sign in to comment.