Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table conversion fails for tables without headers and cells that contain <p>'s #23

Open
PORTB opened this issue May 14, 2022 · 0 comments

Comments

@PORTB
Copy link

PORTB commented May 14, 2022

Cells that contain <p>

Input:

<table>
    <thead>
        <tr>
            <th>Heading 1</th>
            <th>Heading 2</th>
            <th>Heading 3</th>
        </tr>
    </thead>
    <tbody>
    <tr>
        <td>Table cell</td>
        <td>Table cell</td>
        <td>Table cell</td>
        <td>Table cell</td>
    </tr>
    <tr>
        <td>Table cell</td>
        <td>
            <p>p #1</p>
            <p>p #2</p>
        </td>
        <td>Table cell</td>
        <td>Table cell</td>
    </tr>
    </tbody>
</table>

Output:

| Heading 1 | Heading 2 | Heading 3 |
| --- | --- | --- |
| Table cell | Table cell | Table cell | Table cell |
| Table cell |

p #1

p #2  | Table cell | Table cell |

Preferred output:

| Heading 1 | Heading 2 | Heading 3 |
| --- | --- | --- |
| Table cell | Table cell | Table cell | Table cell |
| Table cell | p #1 <br> p #2  | Table cell | Table cell |

or even just removing the line break entirely

Seems related to #7

Tables without a header

Input:

<table>
    <tbody>
    <tr>
        <td>Table cell</td>
        <td>Table cell</td>
        <td>Table cell</td>
        <td>Table cell</td>
    </tr>
    <tr>
        <td>Table cell</td>
        <td>Table cell</td>
        <td>Table cell</td>
        <td>Table cell</td>
    </tr>
    </tbody>
</table>

Output (does not show as a table at all):

| Table cell | Table cell | Table cell | Table cell |
| Table cell | Table cell | Table cell | Table cell |

Preferred output:
Add a blank header to the table

| | | | |
| - | - | - | - |
| Table cell | Table cell | Table cell | Table cell |
| Table cell | Table cell | Table cell | Table cell |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant