Shouldn't the source blocks be using the <code> element? This patch is untested, I can pay more attention to it if first the maintainer(s) agree with my opinion. I thought the <code> tag is good for semantics.
Regards, Nikolaos Chatzikonstantinou
From 61ff4297044beb9d62673557d311475c897f057c Mon Sep 17 00:00:00 2001 From: Nikolaos Chatzikonstantinou <nchatz...@gmail.com> Date: Wed, 26 Feb 2025 03:51:36 -0500 Subject: [PATCH] Add code element inside src-block in ox-html * lisp/org/ox-html.el (org-html-src-block): Add HTML code element inside pre element for Org source blocks exported to HTML. --- lisp/org/ox-html.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index e8ae3a134cb..6f5ce9269ff 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el @@ -3697,7 +3697,7 @@ org-html-src-block " data-editor-type=\"html\"" "") code) - (format "<pre class=\"src src-%s\"%s>%s</pre>" + (format "<pre class=\"src src-%s\"%s><code>%s</code></pre>" ;; Lang being nil is OK. lang label code)))))) -- 2.39.5