Skip to content

Commit

Permalink
fix: table HTML generation corrected (#355)
Browse files Browse the repository at this point in the history
Currently unstructured-inference generates tables with missing markup:

```html
<table>
  <thead> <!-- missing <tr> after <thead> -->
    <th>header cell1</th>
    <th>header cell2</th>
  </thead>
  <tr> <!-- would be nice to add <tbody> if <thead> is used -->
    <td>body cell1</td>
    <td>body cell2</td>
  <tr>
<table>
```

When it should look like:

```html
<table>
  <thead>
    <tr>
      <th>header cell1</th>
      <th>header cell2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>body cell1</td>
      <td>body cell2</td>
    <tr>
  </tbody>
<table>
```

Additionally, fixed `fill_cells` function which added redundant cells
that break the HTML table layout when spanned cells were found.
  • Loading branch information
pawel-kmiecik authored Jun 13, 2024
1 parent 64cd41c commit 0911892
Show file tree
Hide file tree
Showing 4 changed files with 579 additions and 38 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.7.35
Fix syntax for generated HTML tables

## 0.7.34

* Reduce excessive logging
Expand Down
Loading

0 comments on commit 0911892

Please sign in to comment.