Remove superfluous trailing whitespace in Markdown format

This commit is contained in:
Azat Khuzhin 2021-05-15 11:09:17 +03:00
parent 5b668fc351
commit 1cdeafe473
2 changed files with 5 additions and 2 deletions

View File

@ -17,7 +17,10 @@ void MarkdownRowOutputFormat::writePrefix()
for (size_t i = 0; i < columns; ++i)
{
writeEscapedString(header.safeGetByPosition(i).name, out);
writeCString(" | ", out);
if (i == (columns - 1))
writeCString(" |", out);
else
writeCString(" | ", out);
}
writeCString("\n|", out);
String left_alignment = ":-|";

View File

@ -1,4 +1,4 @@
| id | name | array | nullable | low_cardinality | decimal |
| id | name | array | nullable | low_cardinality | decimal |
|-:|:-|:-|:-|:-|-:|
| 1 | name1 | [1,2,3] | Some long string | name1 | 1.110000 |
| 2 | name2 | [4,5,60000] | \N | Another long string | 222.222222 |