[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
Re: [O] [PATCH] ox-html.el: Fix display of language indicators for source blocks
Tue, 19 Sep 2017 06:24:37 +0530
Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)
At 2017-06-14T23:02:12+05:30, N. Raghavendra wrote:
> At 2017-06-12T12:45:13-04:00, Matt Price wrote:
>> As it stands right now, both changes (addition of `data-editor-type`
>> attribute and moving the language name class from `pre` to `code`)
>> are necessary to make klipse work
> I tried with some examples, and the editing facility of klipse seems
> to work even if you put the class attributes in the pre element
> instead of in its code child. Let me check it again and provide an
> MWE, but it'll take a few days, because I am busy at work this week.
> If what I said is indeed correct, I have some suggestions on how to
> deal with the problem.
I am sorry for the inexcusable delay.
1. After rereading your message, I felt that one way out is restore the
treatment of source code blocks, when klipse is not used, to what it
was before you made commit d5bbf36553. This means that the blocks
are exported as content of pre elements, when klipse is not used.
2. When klipse is used, your code kicks in, and puts the source code
blocks of the klipse languages in code children, with appropriate
attributes, of pre elements. Blocks of non-klipse languages are
still put directly into pre elements as before, with the appropriate
3. It remains to decide when klipse is being used. It is used when
`org-html-klipsify-src' has a non-nil value.
4. Lastly, we are not changing the export of code blocks when klipse is
not being used. Therefore, `org-html-keep-old-src' is not needed.
Attached is a patch that implements these changes.
I have also put a test file, and two exported HTML files, with and
without klipse, at http://www.retrotexts.net/tmp/ox-html-patch/
The Makefile there should be self-explanatory. Please see if
klipse.html agrees with what you want, modulo syntax colouring (it was
produced in batch mode). The file noklipse.html validates (it can be
checked at the W3C validator), and has language indicators.
I hope this takes care of our different requirements.
N. Raghavendra <address@hidden>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
Description: Text Data
- Re: [O] [PATCH] ox-html.el: Fix display of language indicators for source blocks,
N. Raghavendra <=