Html2Markdown icon indicating copy to clipboard operation
Html2Markdown copied to clipboard

Table's wont convert

Open enginates opened this issue 7 years ago • 1 comments

Report issue

Tables wont convert

Expected behavior

Converted tables

Actual Behavior

just send back html version

Steps to reproduce the problem

here is the example table.txt

this table returns back as html table

enginates avatar Sep 26 '17 20:09 enginates

@enginates - thanks for the raising the issue. This project currently only supports markdown. If you look at the specification it stipulates that tables are not supported by intention. In fact it shouldn't even support other Markdown elements inside a certain block level elements. I have a bug to fix this #35

Now there are extensions to the Markdown format such as GitHub Flavoured Markdown which do support tables. This project does aspire to support these formats, but table conversion is actually pretty challenging.

Have a read of the <table> specification for GitHub Flavoured Markdown. Key things note are:-

  • No support for <th> in any position other than the entire first row
  • No support for block level elements in <th> or <td>
  • No support for multi-line content in <th> or <td>

So if I am to support this then I need help designing what should happen when tables that cannot be converted are encountered.

I hope that makes sense?

baynezy avatar Sep 28 '17 05:09 baynezy

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jan 13 '24 01:01 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jan 28 '24 01:01 github-actions[bot]