burakkose/just_table

[Bug] Warning: trimming empty <p>

Opened this issue · 1 comments

1. Summary

It would be nice, if tables will not wrap in <p> tag.

2. Argumentation

Tidy mark additional <p> tag as warning: Warning: trimming empty <p>.

D:\Kristinita\output\Gingerinas>tidy SashaExample.html
line 75 column 1 - Warning: trimming empty <p>
line 107 column 7 - Warning: trimming empty <p>

3. Settings

  • Pelican 3.7.1,
  • Python-Markdown 2.6.10,
  • just_table latest version.

4. Example

For example, I create a table in my SashaExample.md file.

[jtable ai="1"]
Name,First,Second
Sasha Chernykh,Best,Amazing
Kristina Kiva,Sunny,Floweret
Katya Desyatnikova,Forever,Young
[/jtable]

5. Steps to reproduce

I reproduce the problem with disabled Pelican and Python-Markdown plugins.

I print in a terminal:

pelican content -s pelicanconf.py

6. Expected behavior

Table no wrap in <p> tag.

<div class="justtable">
    <table>
        <thead>
        <tr>
            <th> No. </th>
            <th>Name</th>
            <th>First</th>
            <th>Second</th>
        </tr>
        </thead>
        <tbody>
            <tr>
                <td> 1 </td>
                <td>Sasha Chernykh</td>
                <td>Best</td>
                <td>Amazing</td>
            </tr>
            <tr>
                <td> 2 </td>
                <td>Kristina Kiva</td>
                <td>Sunny</td>
                <td>Floweret</td>
            </tr>
            <tr>
                <td> 3 </td>
                <td>Katya Desyatnikova</td>
                <td>Forever</td>
                <td>Young</td>
            </tr>
        </tbody>
    </table>
</div>

7. Actual behavior

Table wrap in <p> tag.

<p>
<div class="justtable">
    <table>
        <thead>
        <tr>
            <th> No. </th>
            <th>Name</th>
            <th>First</th>
            <th>Second</th>
        </tr>
        </thead>
        <tbody>
            <tr>
                <td> 1 </td>
                <td>Sasha Chernykh</td>
                <td>Best</td>
                <td>Amazing</td>
            </tr>
            <tr>
                <td> 2 </td>
                <td>Kristina Kiva</td>
                <td>Sunny</td>
                <td>Floweret</td>
            </tr>
            <tr>
                <td> 3 </td>
                <td>Katya Desyatnikova</td>
                <td>Forever</td>
                <td>Young</td>
            </tr>
        </tbody>
    </table>
</div>
</p>

Thanks.

Hi @Kristinita, thank you for reporting. I will try to fix it as soon as possible.