csvprint
csvprint copied to clipboard
Markdown tables with empty cells in edge columns
Creating markdown tables from csvfiles where some edge column is empty produces incorrect output. This could be solved by including the edge border in the markdown as well.
Example:
Input:
Col1, Col2
both, columns
, only last
csvprint yields
Col1 | Col2
:----|:---------
both | columns
| only last
which renders as
| Col1 | Col2 |
|---|---|
| both | columns |
| only last |
However, by including the edge borders:
| Col1 | Col2 |
|:-----|:----------|
| both | columns |
| | only last |
The table renders correctly:
| Col1 | Col2 |
|---|---|
| both | columns |
| only last |