Skip to content

CSV rendering for TSV files does not show rows with empty fields #16559

Closed
@richmahn

Description

@richmahn

TSV (bad rendering): https://try.gitea.io/richmahn/test/src/branch/master/empty_fields.tsv

CSV (works): https://try.gitea.io/richmahn/test/src/branch/master/empty_fields.csv

Description

If a TSV file's row has fields that are empty (i.e. two tabs with no characters in-between), the row gets flagged by the CSV parser as not having the right number of fields:

record on line 3: wrong number of fields

For a CSV file (actual comma delimited) it is ok with empty fields.

The following raw text fails for TSV render despite having the right number of tabs (3) each row:

Row	Field1	Field2	Field3
1	a	b	c
2		d	f
3	g	h	i
4		k	l
5	m	n	
6	p	q	r
7			u
8	v	w	x
9	z		
10			

NOTE: THIS WORKED OK ON GITEA v1.14.X!

Screenshots

Missing rows:

image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions