fix list formatting (#762)

This commit is contained in:
Darren Schroeder 2022-01-16 16:40:40 -06:00 committed by GitHub
parent 283a615ecc
commit c55b6c5ed5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -283,8 +283,10 @@ fn convert_to_table(
vec![("string".to_string(), (row_num + row_offset).to_string())]; vec![("string".to_string(), (row_num + row_offset).to_string())];
if headers.is_empty() { if headers.is_empty() {
// if header row is empty, this is probably a list so format it that way row.push((
row.push(("list".to_string(), item.into_abbreviated_string(config))) item.get_type().to_string(),
item.into_abbreviated_string(config),
))
} else { } else {
for header in headers.iter().skip(1) { for header in headers.iter().skip(1) {
let result = match item { let result = match item {