reverse_markdown
reverse_markdown copied to clipboard
Github tables without a header row
I have some tables that are coded in HTML without
<table>
<tr>
<td><b> header 1 </b></td> <td> <b> header 2 </b> </td>
<td> item 3 </td> <td> item 4 </td>
</tr>
</table>
| header 1 | header 2 |
| item 3 | item 4 |
Suggestion: github_flavored
should treat the first row as the header row to match the Github markdown spec for tables. The markdown shown above is not being converted back to HTML properly by Redcarpet or the github_markup gem (Ruby). Thanks!
Hi @vanboom,
The github markdown specs looks no different to the regular one concerning tables: https://guides.github.com/features/mastering-markdown/
Maybe I don't get the point yet, but I'd rather not treat td
with b
tags any special unless it's a real thing in any spec.
Yes, I agree that the td + b approach would not be the best option. The issue is that I have a table that does not have a
| header 1 | header 2 |
| item 3 | item 4 |
Without the | ---- | ---- |
line to denote the header row, the Github markdown translator is not treating the table as a table when attempting to render the markdown back to HTML. I am using the github-markdown gem to convert the markdown to HTML.
I was able to get a possible solution working on my fork which detects and treats the first row of the table as the header row regardless of the presence of