From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: superfluous tags in html src block output Date: Sat, 14 Sep 2019 17:53:25 +0000 Message-ID: <13D2DFAB-7BCE-4235-9F64-5EDA60982232@ucsd.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46781) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9CEr-0002Wd-J1 for emacs-orgmode@gnu.org; Sat, 14 Sep 2019 13:53:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9CEp-00059M-QU for emacs-orgmode@gnu.org; Sat, 14 Sep 2019 13:53:36 -0400 Received: from mx0a-00395d01.pphosted.com ([148.163.133.170]:33078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i9CEp-00057x-69 for emacs-orgmode@gnu.org; Sat, 14 Sep 2019 13:53:35 -0400 In-Reply-To: Content-Language: en-US Content-ID: <876EFD964930E04A8A237F86C4B8E455@AD.UCSD.EDU> 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: Matt Price Cc: Org Mode This is newer: =3D=3D=3D commit ded3d27b1468b878197e5fe55a70c5e13350ea27 Author: Nik Clayton Date: Tue Jun 4 11:57:40 2019 +0200 ox-html: Wrap each line of a source block in a code element =20 * lisp/ox-html.el (org-html-do-format-code): Wrap each line of a source= block in a code element. =20 This makes it straightforward to add custom decorations to each line using CSS :before and :after properties. =3D=3D=3D HTH, Chuck > On Sep 14, 2019, at 8:52 AM, Matt Price wrote: >=20 > I'm seeing something I hadn't noticed before in src block html exports. I= nstead of producing structures like: >=20 >
> 
> ...
> ...
> ...
> 
> 
>=20 > each individual like is wrapped in its own tag. In regular HTML e= xports this doesn't really affect display, but in exports to reveal using t= he highlight.js plugin, code display gets messed up.=20 >=20 > 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: >=20 > (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=3D\"%s\"" line-nu= m) > "") > 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) >=20 > This code seems to have been around for a while so I don't know whether t= his is new behaviour, but I don't think I've seen line-level tags be= fore. Can anyone confirm? >=20 > See also a MWE in this bug report, which is probably erroneously filed in= the org-re-reveal repo: >=20 > https://gitlab.com/oer/org-re-reveal/issues/27=20 >=20 > I'd love to know whether this is expected behaviour, or if I've gone wron= g somewhere! > THanks, > Matt >=20