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

chalk docgen renders HTML tables incorrectly #178

Open
ee7 opened this issue Jan 30, 2024 · 0 comments
Open

chalk docgen renders HTML tables incorrectly #178

ee7 opened this issue Jan 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ee7
Copy link
Contributor

ee7 commented Jan 30, 2024

Steps to reproduce

Run chalk docgen with chalk 0.3.1 or b8a6943.

Expected behavior

HTML tables are rendered correctly, like:

<table>
  <tbody>
    <tr>
      <th>Command Name</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>insert</td>
      <td>Add chalk marks to artifacts</td>
    </tr>
    <!-- skipping some rows -->
    <tr>
      <td>docgen</td>
      <td>Generate technical documentation</td>
    </tr>
  </tbody>
</table>

Observed behavior

HTML tables are rendered incorrectly, with:

  • an extra <td> and </td> around every cell
  • no <tr> or </tr> anywhere
  • <caption> at the bottom, where it is invalid (it must be the first child of <table>)

like:

<table>
  <tbody>
    <td>
      <th>Command Name</th>
    </td>
    <td>
      <th>Description</th>
    </td>
    <td>
      <td>insert</td>
    </td>
    <td>
      <td>Add chalk marks to artifacts</td>
    </td>
    <!-- skipping some "rows" -->
    <td>
      <td>docgen</td>
    </td>
    <td>
      <td>Generate technical documentation</td>
    </td>
  </tbody>
<caption>
</caption>
</table>

This is blocking https://github.com/crashappsec/marketing-site/pull/192.

Discussion

It looks the bug is in nimutils rope_htmlrender.nim here.

I believe this is independent of #167.

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