Title + section behavior
Posted by
Sylvain Leroux on
Jan 27, 2021; 10:34pm
URL: https://discuss.asciidoctor.org/Title-section-behavior-tp8461.html
Hi,
Could you give me some clarifications about the way the following AsciiDoc document is parsed:
.My title
== My section
Some content
By looking at the docbook output, it seems the title is attached to the first paragraph of the section:
<?xml version="1.0" encoding="UTF-8"?>
<?asciidoc-toc?>
<?asciidoc-numbered?>
<article xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
<info>
<title>My section</title>
<date>2021-01-27</date>
</info>
<section xml:id="_my_section">
<title>My section</title>
<formalpara>
<title>My title</title>
<para>Some content</para>
</formalpara>
</section>
</article>
Is this the expected behavior? Or is the initial document malformed--and thus the result should be considered as undefined?