oreillymedia / asciidoctor-htmlbook

Templates for the htmlbook backend for Asciidoctor
45 stars 15 forks source link

Possible to always add <p> elements within admonitions? #81

Closed sandersk closed 9 years ago

sandersk commented 9 years ago

Right now, AsciiDoctor generates <p> elements within <div>s for admonitions (notes, tips, warnings) when Admonition Block markup is used. For example, this AsciiDoc:

[NOTE]
====
Here is a note
====

Generates the following HTML:

<div data-type="note">
<p>Here is a note</p>
</div>

But if instead of Admonition Block markup, you use this analogous Admonition Paragraph (see http://www.methods.co.nz/asciidoc/userguide.html#X28) markup:

NOTE: Here is a note

Or this analogous Admonition Paragraph markup:

[NOTE]
Here is a note

It converts without <p> elements:

<div data-type="note">Here is a note
</div>
</section

Would it be possible to change AsciiDoctor handling so that <p> elements are always added within admonitions in HTMLBook output, regardless of whether Admonition Block or Admonition Paragraph markup is used? This would be valuable as having AsciiDoctor consistently generate <p> elements with admonition <div>s would make it easier to style the HTML with CSS.