From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: superfluous tags in html src block output Date: Sat, 14 Sep 2019 11:52:06 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f81efb0592855a0b" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56591) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9ALV-0006Wg-Fi for emacs-orgmode@gnu.org; Sat, 14 Sep 2019 11:52:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9ALU-0005JI-6r for emacs-orgmode@gnu.org; Sat, 14 Sep 2019 11:52:21 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:46121) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9ALT-0005In-Uo for emacs-orgmode@gnu.org; Sat, 14 Sep 2019 11:52:20 -0400 Received: by mail-pl1-x62b.google.com with SMTP id t1so14608129plq.13 for ; Sat, 14 Sep 2019 08:52:19 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode --000000000000f81efb0592855a0b Content-Type: text/plain; charset="UTF-8" I'm seeing something I hadn't noticed before in src block html exports. Instead of producing structures like:

...
...
...

each individual like is wrapped in its own tag. In regular HTML exports this doesn't really affect display, but in exports to reveal using the highlight.js plugin, code display gets messed up. >From what I can tell these code tags are generated in org-html-do-format-code, in this section which starts on line 22459 of my pretty recent org: (org-export-format-code code (lambda (loc line-num ref) (setq loc (concat ;; Add line number, if needed. (when num-start (format "%s" (format num-fmt line-num))) ;; Transcoded src line. (format "%s" (if num-start (format " data-ox-html-linenr=\"%s\"" line-num) "") loc) ;; Add label, if needed. (when (and ref retain-labels) (format " (%s)" ref)))) ;; Mark transcoded line as an anchor, if needed. (if (not ref) loc (format "%s" ref loc))) num-start refs) This code seems to have been around for a while so I don't know whether this is new behaviour, but I don't think I've seen line-level tags before. Can anyone confirm? See also a MWE in this bug report, which is probably erroneously filed in the org-re-reveal repo: https://gitlab.com/oer/org-re-reveal/issues/27 I'd love to know whether this is expected behaviour, or if I've gone wrong somewhere! THanks, Matt --000000000000f81efb0592855a0b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm seeing something I hadn't noticed before = in src block html exports. Instead of producing structures like:
=
<pre>
<code>
<span>...= </span>
<span>...</span>
<span>= ...</span>
</code>
</pre>
<= br>
each individual like is wrapped in its own <code> tag.= =C2=A0 In regular HTML exports this doesn't really affect display, but = in exports to reveal using the highlight.js plugin, code display gets messe= d up.

From what I can tell these code tags ar= e generated in org-html-do-format-code, in this section which starts on lin= e 22459 of my pretty recent org:

(org-export-forma= t-code
=C2=A0 =C2=A0 =C2=A0code
=C2=A0 =C2=A0 =C2=A0(lambda (loc line= -num ref)
=C2=A0 =C2=A0 =C2=A0 =C2=A0(setq loc
=C2=A0 =C2=A0 (conca= t
=C2=A0 =C2=A0 =C2=A0;; Add line number, if needed.
=C2=A0 =C2= =A0 =C2=A0(when num-start
(format "<span class=3D\"linenr= \">%s</span>"
(format num-fmt line-num)))
=C2= =A0 =C2=A0 =C2=A0;; Transcoded src line.
=C2=A0 =C2=A0 =C2=A0(format &= quot;<code%s>%s</code>"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (if num-start
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (format " data-ox-html-linenr=3D\"%s\"" line-num= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 "")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 loc)
=C2=A0 =C2=A0 =C2=A0;; Add lab= el, if needed.
=C2=A0 =C2=A0 =C2=A0(when (and ref retain-labels) (form= at " (%s)" ref))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0;; Mark transcod= ed line as an anchor, if needed.
=C2=A0 =C2=A0 =C2=A0 =C2=A0(if (not ref= ) loc
(format "<span id=3D\"coderef-%s\" class=3D\&q= uot;coderef-off\">%s</span>"
ref loc)))
=C2=A0 = =C2=A0 =C2=A0num-start refs)

This code seems to ha= ve been around for a while so I don't know whether this is new behaviou= r, but I don't think I've seen line-level <code> tags before.= =C2=A0 Can anyone confirm?

See also a MWE in this = bug report, which is probably erroneously filed in the org-re-reveal repo:<= /div>

=
I'd love to know whether this is expected behaviour, or = if I've gone wrong somewhere!
THanks,
Matt

--000000000000f81efb0592855a0b--