Skip to content

Commit

Permalink
fix: make inert_highlight pure
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Sketon committed Jan 13, 2024
1 parent a88d3ea commit e338a68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/js/insert_highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
})

const $codeFigcaption = $('<div class="code-figcaption"><div class="code-left-wrap"><div class="code-decoration"></div><div class="code-lang"></div></div><div class="code-right-wrap"><div class="code-copy icon-copy"></div><div class="icon-chevron-down code-expand"></div></div></div>');
$('figure.highlight').prepend($codeFigcaption);
if($('figure.highlight').children('.code-figcaption').length === 0 ) {
$('figure.highlight').prepend($codeFigcaption);
}

// 代码复制
new ClipboardJS('.code-copy', {
Expand Down

0 comments on commit e338a68

Please sign in to comment.