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

Tables with captions in paragraphs need an empty line #135

Open
wheelercj opened this issue Nov 3, 2024 · 0 comments
Open

Tables with captions in paragraphs need an empty line #135

wheelercj opened this issue Nov 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@wheelercj
Copy link
Collaborator

If a table with a caption is in a paragraph element, the table does not correctly convert from HTML to markdown because there is no empty line between the caption and the table in the result.

For example, the HTML below results in the markdown after it.

<p>
  <table>
    <caption>Here's a caption.</caption>
    <tr>
      <td>history</td>
      <td>absorption</td>
    </tr>
    <tr>
      <td>analyst</td>
      <td>retire</td>
    </tr>
  </table>
</p>
**Here's a caption.**
| history | absorption |
| --- | --- |
| analyst | retire |

Expected behavior
There should be an empty line between the caption and the table so that markdown renderers will recognize the table as a table.

@wheelercj wheelercj added the bug Something isn't working label Nov 3, 2024
@wheelercj wheelercj self-assigned this Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant