tablewriter
tablewriter copied to clipboard
Adding functionality to render a table from a HTML file
Completing one of the todos on the readme by adding the functionality to render table from html file. This PR adds a new dependency to the package: golang.org/x/net/html to help with parsing the html.
Can we have more test?
Could you please add tests for broken html? Thanks.
@mattn I already added a test for when there are some unclosed tags. What other edge cases should I test for ?
For example:
<tr>
<td>foo</td>
</tr>
<tr>
<th>bar</th>
</tr>
For example:
<tr> <td>foo</td> </tr> <tr> <th>bar</th> </tr>
Okay added that, it returns :
// Output: *=====*
// | BAR |
// *=====*
// | foo |
// *=====*