Skip to content

Commit

Permalink
Trim stdout to make the CLI more usable
Browse files Browse the repository at this point in the history
Files and interactive both include trailing newlines. Trim them off to prevent weirdness

Signed-off-by: Jesse Donat <[email protected]>
  • Loading branch information
donatj committed Dec 1, 2023
1 parent bdfdd8d commit 016a86f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/csvtomarkdown
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ process.stdin.on('readable', () => {
});

process.stdin.on('end', () => {
process.stdout.write(CsvToMarkdown(data, delim, headers));
process.stdout.write(CsvToMarkdown(data.trim(), delim, headers));
});

function getDelimiterName(delim) {
Expand Down

0 comments on commit 016a86f

Please sign in to comment.