Skip to content

niceTables.pl layout table not terminated properly with mismatched cell count #1182

@drgrice1

Description

@drgrice1

Here is a MWE that shows the problem:

DOCUMENT();
loadMacros(qw{PGstandard.pl PGML.pl});

BEGIN_PGML
[#
    [.A.] [.B.] [.C.]*
    [.D.] [.E.]
#]*{ align => 'ccc' }

Content after
END_PGML

ENDDOCUMENT();

In that example, the "Content after" is not after the table. Instead it appears to be in a third row of the table. Really it is just inside the div that is supposed to contain the table. The following is the generated html for the problem:

<div class="PGML">
    <div style="margin: auto; display: table; border-collapse: collapse">
        <div style="display: table-row">
            <div style="vertical-align: top; padding: 0.85rem 0.85rem; text-align: center; display: table-cell">A</div>
            <div style="vertical-align: top; padding: 0.85rem 0.85rem; text-align: center; display: table-cell">B</div>
            <div style="vertical-align: top; padding: 0.85rem 0.85rem; text-align: center; display: table-cell">C</div>
        </div>
        <div style="display: table-row">
            <div style="vertical-align: top; padding: 0.85rem 0.85rem; text-align: center; display: table-cell">D</div>
            <div style="vertical-align: top; padding: 0.85rem 0.85rem; text-align: center; display: table-cell">E</div>
            <div style="vertical-align: top; padding: 0.85rem 0.85rem; text-align: center; display: table-cell"></div>
        </div>
        <div style="margin-top: 1em"></div>
        Content after
    </div>
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions