code: set wrap-code flag in all cases

- for plain html block code with <pre><code>
- removing if highlight code has hl_inline=true
This commit is contained in:
Sören Weber 2025-02-14 20:32:07 +01:00
parent dffe6e1ed0
commit 4a25b6a875
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
4 changed files with 13 additions and 2 deletions
static/js

View file

@ -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;