Login  Register

Re: Is a blank line mandatory between a section title and its content?

Posted by Sylvain Leroux on Jan 28, 2021; 10:28am
URL: https://discuss.asciidoctor.org/Is-a-blank-line-mandatory-between-a-section-title-and-its-content-tp8471p8474.html

mojavelinux wrote
A section title is self-terminating [...]
That also explains why a section's title can't have a continuation (`+`) and MUST be on the same line as the `==` token.


> I noticed this is the case for level 0 sections (otherwise, the text is
taken as the author name--something which is explained in the docs).

You are confusing a level-0 section title with a document header (document
title + metadata). The document header contains a level-0 section that is
the doctitle. (https://docs.asciidoctor.org/asciidoc/latest/document/header/)
But all other level-0 section titles in a multipart book are parsed just
like all the other section titles.
Indeed, this was not clear in my mind. As far as I remember, I never used level-0 sections in my own documents. So, to check my understanding here:

= Some title

The above document fragment could be parsed:

* either as a document header, if it's at the start of the document
* or, as a level-0 section if it's found anywhere else.

Is that correct?
my asciidoctor-based website: https://yesik.it