readmeio / markdown

ReadMe's flavored Markdown parser and React-based rendering engine.
https://rdmd.readme.io
ISC License
33 stars 9 forks source link

fix: tables #938

Closed kellyjosephprice closed 1 month ago

kellyjosephprice commented 1 month ago
PR App RM-9793

🧰 Changes

Changes how tables are saved as JSX.

The align attribute is stored on the Table component, as well as the table cells:

<Table align={["center", "center"]}>
  <thead>
    <tr>
      <th style={{ textAlign: 'center' }}>Hi!</th>
      <th style={{ textAlign: 'center' }}>Hello!</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style={{ textAlign: 'center' }}>Bye!</td>
      <td style={{ textAlign: 'center' }}>Bye Bye!</td>
    </tr>
  </tbody>
</Table>

It also includes some cleanup of code that's not being used, namely html, esast, and hastFromHtml. hastFromHtml was going to be used for search indexing, but I think we're going to switch to much simpler parsing of just the hast.

🧬 QA & Testing

kellyjosephprice commented 1 month ago

Not ready, I keep forgetting.

rafegoldberg commented 1 month ago

This PR was released!

🚀 Changes included in v6.75.0-beta.73