Skip to content

admonition-blocks conversion bug/enhancement #20

@nidomiro

Description

@nidomiro

I have the following code as test:

[TIP]
.Info
=====
Go to this URL to learn more about it:

* http://asciidoc.org

Or you could return to the xref:first[] or <<purpose,Purpose>>.
=====

Asciidoctor-pdf renders the same statement as:

Asciidoctor-html5s currently renders it as:

<aside class="admonition-block tip" role="doc-tip">
    <h6 class="block-title">
        <span class="title-label">Tip: </span>
        Info
    </h6>
    <p>Go to this URL to learn more about it:</p>
    <div class="ulist">
        <ul>
            <li><a class="bare" href="http://asciidoc.org">http://asciidoc.org</a></li>
        </ul>
    </div>
    <p>Or you could return to the <a href="#first">First Steps</a> or <a href="#purpose">Purpose</a>.</p>
</aside>

This is impossible to style correctly and the Info is at the wrong place (See stackoverflow).
In general it would be very good to encapsulate the "content" of every admonition in another div in order to be able to style it correctly.

I would expect something like this:

<aside class="admonition-block tip" role="doc-tip">
    <h6 class="block-title">
        <span class="title-label">Tip: </span>
    </h6>
    <div class="block-content"> <!-- or some other class-name -->
        <h6 class="block-title">Info</h6>
        <p>Go to this URL to learn more about it:</p>
        <div class="ulist">
            <ul>
                <li><a class="bare" href="http://asciidoc.org">http://asciidoc.org</a></li>
            </ul>
        </div>
        <p>Or you could return to the <a href="#first">First Steps</a> or <a href="#purpose">Purpose</a>.</p>
    </div>
</aside>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions