On Tue, Mar 11, 2025 at 1:52 PM Ihor Radchenko <yanta...@posteo.net> wrote:
>
> Nikolaos Chatzikonstantinou <nchatz...@gmail.com> writes:
>
> > 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.
>
> Timothy, may you take a look?
>
> For me, the patch looks reasonable, especially since <code> is used with
> `org-html-klipsify-src'. Although, I'd be careful moving class property
> into code - it might potentially block CSS selectors.

I put the class property into <code> out of confusion. I was not sure
what the intention of omitting the <code> for non-klipsify output was,
and I thought, maybe they worried about clashes in CSS selectors. I'm
not suggesting it is better to have the property in <code>, the code
element can always be selected with a child selector.

> > 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))))))

Reply via email to