Skip to content

Commit 325957f

Browse files
committed
Disable Field count validation of CSV viewer
Default behaviour rejected all rows (Records) with more or fewer columns (Fields) than the first row, preventing them from rendering at all and silently hiding them.
1 parent 28a7cc4 commit 325957f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/csv/csv.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ func CreateReader(input io.Reader, delimiter rune) *stdcsv.Reader {
3030
// thus would change `\t\t` to just `\t` or ` ` (two spaces) to just ` ` (single space)
3131
rd.TrimLeadingSpace = true
3232
}
33+
// Don't force validation of every row to have the same number of entries as the first row.
34+
rd.FieldsPerRecord = -1
3335
return rd
3436
}
3537

0 commit comments

Comments
 (0)