Beautify does not work with colgroup

Bug #1826631 reported by leastcommonancestor on 2019-04-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

If a table contains colgroup- and col-tags, "Beautify" does not work on that table. Also, rows containing th-tags are not beautified.

I need more detail, what does "not work" mean? Can you post an example
that you believeis notbeing correctly besutified.

 status incomplete

Changed in calibre:
status: New → Incomplete

On 27.04.19 09:42, Kovid Goyal wrote:
> I need more detail, what does "not work" mean? Can you post an example
> that you believeis notbeing correctly besutified.
>
> status incomplete
>
> ** Changed in: calibre
> Status: New => Incomplete
>
If I take the example from w3schools:

<table>
  <colgroup>
    <col span="2" style="background-color:red">
    <col style="background-color:yellow">
  </colgroup>
  <tr>
    <th>ISBN</th>
    <th>Title</th>
    <th>Price</th>
  </tr>
  <tr>
    <td>3476896</td>
    <td>My first HTML</td>
    <td>$53</td>
  </tr>
</table>

and strip the formatting:

<table><colgroup><col span="2" style="background-color:red"/><col
style="background-color:yellow"/></colgroup><tbody><tr><th>ISBN</th><th>Title</th><th>Price</th></tr><tr><td>3476896</td><td>My
first HTML</td><td>$53</td></tr></tbody></table>

"Beautify" leaves this unchanged. If I remove the colgroup the result is:

  <table>

    <tbody>

      <tr><th>ISBN</th><th>Title</th><th>Price</th></tr>

      <tr>
        <td>3476896</td>
        <td>My first HTML</td>
        <td>$53</td>
      </tr>

    </tbody>

  </table>

If I replace th-tags with td-tags I get:

  <table>

    <tbody>

      <tr>
        <td>ISBN</td>
        <td>Title</td>
        <td>Price</td>
      </tr>

      <tr>
        <td>3476896</td>
        <td>My first HTML</td>
        <td>$53</td>
      </tr>

    </tbody>

  </table>

Greetings

LCA

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers