emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] ox-html.el: Fix display of language indicators for sourc


From: N. Raghavendra
Subject: Re: [O] [PATCH] ox-html.el: Fix display of language indicators for source blocks
Date: Wed, 07 Jun 2017 01:38:26 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

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 <address@hidden>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]