csvprint icon indicating copy to clipboard operation
csvprint copied to clipboard

Markdown tables with empty cells in edge columns

Open mathialo opened this issue 6 years ago • 0 comments

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

mathialo avatar Aug 23 '19 11:08 mathialo