mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-07-06 23:50:32 +00:00
code: set wrap-code flag in all cases #1022
- for plain html block code with <pre><code> - removing if highlight code has hl_inline=true
This commit is contained in:
parent
dffe6e1ed0
commit
4a25b6a875
4 changed files with 13 additions and 2 deletions
static/js
|
@ -695,6 +695,9 @@ function initCodeClipboard() {
|
|||
var clone = pre.cloneNode(true);
|
||||
var div = document.createElement('div');
|
||||
div.classList.add('highlight');
|
||||
if (window.relearn.enableBlockCodeWrap) {
|
||||
div.classList.add('wrap-code');
|
||||
}
|
||||
div.appendChild(clone);
|
||||
pre.parentNode.replaceChild(div, pre);
|
||||
pre = clone;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue