aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorpanda-z <panda.hust@gmail.com>2020-04-13 22:08:43 +0800
committerGitHub <noreply@github.com>2020-04-13 22:08:43 +0800
commitaf108c4ad50793637f244149fb402a7ba61b8a64 (patch)
tree21b05de51e5d8d354c0a396d9d7d7eef76b4fc2a /assets
parente94d9b17e4aeda52ea238cb8f80d92e3039cedd8 (diff)
fix(js): code block title for hugo 0.60 or above (#229)
Closes #221
Diffstat (limited to 'assets')
-rw-r--r--assets/js/even.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/assets/js/even.js b/assets/js/even.js
index 01b9200..5cb63ca 100644
--- a/assets/js/even.js
+++ b/assets/js/even.js
@@ -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;
}