emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Syntax discussion] Should we treat src blocks without LANG as parag


From: Kaushal Modi
Subject: 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)
Date: Thu, 15 Dec 2022 05:32:30 -0500

On Thu, Dec 15, 2022, 4:32 AM Ihor Radchenko <yantar92@posteo.net> wrote:
Johan Bolmsjö <org-mode@johan.bitmaster.se> writes:

> #+caption: Caption 1
> #+begin_src
> foo bar baz
> #+end_src

There is an inconsistency here between Org parser and
https://orgmode.org/worg/org-syntax.html + manual.

The actual parser does allow empty lang in src blocks, setting :lang
element property to nil.


Should we stop doing this and treat such src
blocks as paragraphs?

I think that this would cause more of a surprise to the user when something in a source block exports as a plain paragraph instead of in a <pre> block (for HTML exports). 

Or should we allow empty lang and instead adapt
the exporters to treat empty lang correctly?

I vote for this one. Then

#+begin_src
foo
#+end_src

will be analogous to this in Markdown:

```
foo
```



reply via email to

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