From 865f195d595ccfd74eac88b825db8f890aa97633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Fri, 14 Feb 2025 20:47:49 +0100 Subject: [PATCH] code: set highlight flag for inline code if necessary #1022 was missing for inline code that wasn't generated by the highlight shortcode, meaning: Markdown backticks, html --- layouts/partials/version.txt | 2 +- static/js/theme.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/partials/version.txt b/layouts/partials/version.txt index d1e36e3274..dfd6573a84 100644 --- a/layouts/partials/version.txt +++ b/layouts/partials/version.txt @@ -1 +1 @@ -7.3.2+dffe6e1ed0dfd9b297cb438839bd1af816021f18 \ No newline at end of file +7.3.2+4a25b6a875b2b452f58f70fa254a8dd19a5724dd \ No newline at end of file diff --git a/static/js/theme.js b/static/js/theme.js index 78f96b3748..98da6b21bb 100644 --- a/static/js/theme.js +++ b/static/js/theme.js @@ -687,7 +687,7 @@ function initCodeClipboard() { var pre = code.parentNode; pre.dataset.code = text; var p = pre.parentNode; - // indented code blocks are missing the div + // html
 constructs and indented code blocks are missing the div
         while (p != document && (p.tagName.toLowerCase() != 'div' || !p.classList.contains('highlight'))) {
           p = p.parentNode;
         }
@@ -718,6 +718,7 @@ function initCodeClipboard() {
         });
         pre.parentNode.insertBefore(button, pre.nextSibling);
       } else {
+        code.classList.add('highlight');
         code.dataset.code = text;
         code.parentNode.insertBefore(button, code.nextSibling);
       }