Re: How to get rid of paragraph duplication?

Posted by aheusingfeld on
URL: https://discuss.asciidoctor.org/Re-How-to-get-rid-of-paragraph-duplication-tp470p483.html

Though I understand the assumption behind this behaviour, IMO it is way too complex. Not even in a book there is a title for each and every paragraph.

I'd rather argue that "div.paragraph" is not correct as semantically seen this is actually marking a "section" (http://www.w3.org/html/wg/drafts/html/master/dom.html#paragraph). And of course a <section> may have a title or heading declared as <h1> to <h6> (http://www.w3.org/html/wg/drafts/html/master/sections.html#the-section-element). But I guess this would have to be filed against AsciiDoc itself.

It seems I don't know Docbook in detail, because I wonder why AsciiDoc differentiates between headings (##heading) and titles (.title). See the following example for details:

Source:
-----
### My heading

lorem ipsum
lorem ipsum

lorem ipsum
-----

Output:
-----
<body class="article">
<div id="header">
</div>
<div id="content">
<div class="sect2">
<h3 id="_my_heading">My heading</h3>
<div class="paragraph">
<p>lorem ipsum
lorem ipsum</p>
</div>
<div class="paragraph">
<p>lorem ipsum</p>
</div>

</div>

</div>
<div id="footer">
<div id="footer-text">
Last updated 2013-08-20 10:57:02 CEST
</div>
</div>
</body>
-----


Expected output:
-----
<body class="article">
<div id="header"></div>
<main id="content">
<section>
<h3 id="_my_heading">My heading</h3>
<p>lorem ipsum<br>
lorem ipsum</p>
<p>lorem ipsum</p>
</section>
</main>
<footer>
<p>Last updated <time>2013-08-20 10:57:02+0200</time></p>
</footer>
</body>
-----
Of course one could argue that for a line break there shouldn't be a <br> but the <p> should be closed and another one opened, but the <br> is my understanding of a simple line break. Argue now! ;)

As I guess, we all agree that Docbook is way too complex for the daily doing, my question would be how we can make the output of the assumptions (or conventions) as simple as possible without breaking with Asciidoc. Is there a way to discuss the complexity problem with them?