Hi, I tried to convert html table to markdown table, but I can't get correct result:
<table border="1" id="tableWithOutHeadAndBody">
<caption>table Without Head And Body</caption>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
var converter = new showdown.Converter(})
result = converter.makeMarkdown(document.getElementById("tableWithOutHeadAndBody").outerHTML)
console.log(result)
so, if i want to convert html table element to markdown table, the thead and the tbody element is needed?
if so, may be add a explain on docs is helpful.... I tried a lot of time to read docs and serach....
anyway, thanks for the excellent work on showdown!
Hi, I tried to convert html table to markdown table, but I can't get correct result:
I read the docs, add a option, it still not work
var converter = new showdown.Converter({ tables: true })
[Available options - Showdown documentation](https://showdownjs.com/docs/available-options/#tables)and then I search the issue, and find somebody add thead and tbody element [Bug] in table align right · Issue #689 · showdownjs/showdown
so I tried it ,it works:
envirement: browser: chrome 103.0.5060.66 (64 bit) (cohort: Stable) showdown: 2.1.0 https://unpkg.com/showdown@2.1.0/dist/showdown.min.js
so, if i want to convert html table element to markdown table, the thead and the tbody element is needed? if so, may be add a explain on docs is helpful.... I tried a lot of time to read docs and serach....
anyway, thanks for the excellent work on showdown!
complete code : https://github.com/Peter-JXL/learnturndown/blob/master/src/testShowdown/testShowdown.html