[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] ox-html does not export captions of source blocks without lang
From: |
Ihor Radchenko |
Subject: |
Re: [BUG] ox-html does not export captions of source blocks without language |
Date: |
Tue, 27 Dec 2022 14:08:32 +0000 |
Johan Bolmsjö <org-mode@johan.bitmaster.se> writes:
> ** Description
>
> The caption "Caption 1" is not exported by ox-html in the following
> source block.
>
> #+caption: Caption 1
> #+begin_src
> foo bar baz
> #+end_src
>
> The caption "Caption 2" is exported by ox-html in the following source
> block.
>
> #+caption: Caption 2
> #+begin_src sh
> echo foo bar baz
> #+end_src
>
> ** Expectation
>
> The caption "Caption 1" is exported just as "Caption 2" is. The plain
> text exporter ox-ascii exports both "Caption 1" and "Caption 2".
Here is the plan to resolve this issue:
1. We update the manual allowing src blocks to have empty language spec
2. We update org-syntax document
3. We change org-html-src-block to add caption to src blocks without lang
4. We _do not_ treat such src blocks as example blocks.
It is because at least ox-html, ox-latex, and ox-ascii never add
captions to example blocks. Changing this default may possible, but
require further discussion. The existing code already uses separate
implementations for example blocks and src blocks with nil lang.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language), (continued)
- Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs?, Max Nikulin, 2022/12/17
- [BUG] org-latex-src-block-backend is directly used as variable instead of querying export option (was: [Syntax discussion] Should we treat src blocks without LANG as paragraphs?), Ihor Radchenko, 2022/12/18
- Re: [BUG] org-latex-src-block-backend is directly used as variable instead of querying export option (was: [Syntax discussion] Should we treat src blocks without LANG as paragraphs?), Timothy, 2022/12/18
- Re: [BUG] org-latex-src-block-backend is directly used as variable instead of querying export option (was: [Syntax discussion] Should we treat src blocks without LANG as paragraphs?), Ihor Radchenko, 2022/12/21
- Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language), Ihor Radchenko, 2022/12/17
Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language), Timothy, 2022/12/15
Re: [BUG] ox-html does not export captions of source blocks without language,
Ihor Radchenko <=