Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Incorrect conversions for tables with row of different lengths #23

Open
EvitanRelta opened this issue Dec 20, 2022 · 0 comments
Open

Incorrect conversions for tables with row of different lengths #23

EvitanRelta opened this issue Dec 20, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@EvitanRelta
Copy link
Owner

EvitanRelta commented Dec 20, 2022

Problem 1

Currently, this HTML:

<table>
  <tr>
    <th>Header 1</th>
    <th>Header 2</th>
  </tr>
  <tr>
    <td>Cell 1</td>
  </tr>
</table>


Throws an error:

image


The output markdown should be in HTML-syntax, the same as the above HTML.


Note: It should NOT be in markdown with missing cells like:

| Header 1 | Header 2 |
| -------- | -------- |
| Cell 1   |


As the above markdown renders as:

Header 1 Header 2
Cell 1


When it's suppose to be:

Header 1 Header 2
Cell 1

Problem 2

Currently, this HTML:

<table>
  <tr>
    <th>Header 1</th>
  </tr>
  <tr>
    <td>Cell 1</td>
    <td>Cell 2</td>
  </tr>
</table>


converts to this markdown:

| Header 1 |
|----------|
| Cell 1   | Cell 2 |


which incorrectly renders in GitHub as:

Header 1
Cell 1


The output markdown should be in HTML-syntax, the same as the above HTML.


Note: It should NOT be in markdown with empty headers:

| Header 1 |        |
| -------- | ------ |
| Cell 1   | Cell 2 |


As the above markdown renders as:

Header 1
Cell 1 Cell 2


When it's suppose to be:

Header 1
Cell 1 Cell 2
@EvitanRelta EvitanRelta added the bug Something isn't working label Dec 20, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant