From mboxrd@z Thu Jan 1 00:00:00 1970 From: "N. Raghavendra" Subject: Re: [PATCH] ox-html.el: Fix display of language indicators for source blocks Date: Wed, 07 Jun 2017 01:38:26 +0530 Message-ID: <87wp8oyj45.fsf@gmail.com> References: <8760g9ywga.fsf@hri.res.in> Reply-To: "N. Raghavendra" Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIKmK-0006u4-EZ for emacs-orgmode@gnu.org; Tue, 06 Jun 2017 16:08:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIKmF-0006cI-J8 for emacs-orgmode@gnu.org; Tue, 06 Jun 2017 16:08:36 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:32771) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dIKmF-0006bo-Cb for emacs-orgmode@gnu.org; Tue, 06 Jun 2017 16:08:31 -0400 Received: by mail-pf0-x241.google.com with SMTP id f27so25295339pfe.0 for ; Tue, 06 Jun 2017 13:08:31 -0700 (PDT) Received: from ailuros (hrimail2.hri.res.in. [220.227.103.136]) by smtp.gmail.com with ESMTPSA id y8sm5631025pge.0.2017.06.06.13.08.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 13:08:29 -0700 (PDT) In-Reply-To: <8760g9ywga.fsf@hri.res.in> (N. Raghavendra's message of "Tue, 06 Jun 2017 20:50:21 +0530") 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: emacs-orgmode@gnu.org At 2017-06-06T20:50:21+05:30, N. Raghavendra wrote: > CSS rules like > > pre.src-awk:before { content: 'Awk'; } > > in `org-html-style-default' don't work in the current Org version, > because the class attribute has been moved from the `pre' element to a > `code' child of that element. It appears that this change was introduced in commit d5bbf365533ba45d72ebed8121c7612c860ea944. It also introduced the insertion of the attribute "data-editor-type" in the HTML export, when 1. `org-html-klipsify-src' is true, and 2. an HTML source block is being exported. Now, "data-editor-type" is not a valid attribute with respect to the XHTML1 Strict DTD (or any other W3C X/HTML DTD). Therefore, when 1 and 2 are true, this attribute renders the exported HTML files invalid with respect to the DTDs in `org-html-doctype-alist'. I think this would count as a drawback to those who care about HTML validation, especially since ox-html indicates its concern for validation through `org-html-validation-link', etc. I don't know what is the best way to deal with this problem. One possibility is to put a warning in the documentation of `org-html-klipsify-src' that setting it to true would lead to invalid HTML exports when the Org file contains an HTML source block. Cheers, Raghu. -- N. Raghavendra , http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/