Skip to content

Please support cells spanning multiple rows or/and columns in https://lwebapp.com/en/html-table-to-ascii #2

@jpluimers

Description

@jpluimers

I like https://lwebapp.com/en/html-table-to-ascii a lot.

(Note: all examples below are for "Header location=None")

One improvement would be for it to support HTML-tables like this one:

<table>
<tbody>
  <tr>
    <td rowspan="2"></td>
    <td colspan="3"></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
    <td></td>
  </tr>
</tbody>
</table>

The current output for Unicode is this:

╔══╗
║  ║
║  ║
╚══╝

and for ASCII (separated) is this:

+--+
|  |
+--+
|  |
+--+

When filling the cells with values like this HTML:

<table>
<tbody>
  <tr>
    <td rowspan="2">a</td>
    <td colspan="3">a</td>
  </tr>
  <tr>
    <td>a</td>
    <td>a</td>
    <td>a</td>
  </tr>
</tbody>
</table>

Then both the Unicode and ASCII (separated) generated text becomes this:

Invalid array length

It would be nice if that changed to the below output (in addition without any cell content it should remove the a entries).

Proposte output for Unicode is this:

╔═══╦═══════════╗
║ a ║ a         ║
║   ╠═══╦═══╦═══╣
║   ║ a ║ a ║ a ║
╚═══╩═══╩═══╩═══╝

and for ASCII (separated) is this:

+---+-----------+
| a | a         |
|   +---+---+---+
|   | a | a | a |
+---+---+---+---+

Thanks for considering this issue.

--jeroen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions