plone / blocks-conversion-tool

A tool to convert HTML (as used in Plone Classic) to Blocks (as used on Volto)
7 stars 5 forks source link

HTML table to slate: First row is always interpreted as header #36

Closed mbarde closed 9 months ago

mbarde commented 11 months ago

What?

When converting a HTML table to slate block the first row is always interpreted as header row (option hideHeaders is always false). In my opinion this should only be the case if first tr contains th-elements.

Example

Following HTML:

<table>
  <tbody>
    <tr>
      <td>Name:</td>
      <td>Rick</td>
    <tr>
    <tr>
      <td>Address:</td>
      <td>Main Street</td>
    <tr>
  </tbody>
</table>

currently results in this:

Screenshot_2023-09-20_15-14-38

(with hideHeaders: false)

I think it should be:

Screenshot_2023-09-20_15-14-19

(with hideHeaders: true)

davisagli commented 9 months ago

Fixed in @plone/blocks-conversion-tool 0.7.1