1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-23 00:54:28 +00:00
gitea/services
Richard Mahn 40c8451b7d
Properly determine CSV delimiter (#17459)
* Fixes #16558 CSV delimiter determiner

* Fixes #16558 - properly determine CSV delmiiter

* Moves quoteString to a new function

* Adds big test with lots of commas for tab delimited csv

* Adds comments

* Shortens the text of the test

* Removes single quotes from regexp as only double quotes need to be searched

* Fixes spelling

* Fixes check of length as it probalby will only be 1e4, not greater

* Makes sample size a const, properly removes truncated line

* Makes sample size a const, properly removes truncated line

* Fixes comment

* Fixes comment

* tests for FormatError() function

* Adds logic to find the limiter before or after a quoted value

* Simplifies regex

* Error tests

* Error tests

* Update modules/csv/csv.go

Co-authored-by: delvh <dev.lh@web.de>

* Update modules/csv/csv.go

Co-authored-by: delvh <dev.lh@web.de>

* Adds comments

* Update modules/csv/csv.go

Co-authored-by: delvh <dev.lh@web.de>

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: delvh <dev.lh@web.de>
2021-10-30 23:50:40 +08:00
..
agit Return correct error response for agit force-push (#16989) 2021-09-08 22:20:55 +02:00
archiver Fix bundle creation (#17079) 2021-09-26 00:29:25 +03:00
attachment Read expected buffer size (#17409) 2021-10-24 22:12:43 +01:00
auth Add groups scope/claim to OIDC/OAuth2 Provider (#17367) 2021-10-22 17:19:24 +08:00
comments Save and view issue/comment content history (#16909) 2021-10-10 18:40:03 -04:00
externalaccount Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
forms Add appearance section in settings (#17433) 2021-10-27 23:40:08 +08:00
gitdiff Properly determine CSV delimiter (#17459) 2021-10-30 23:50:40 +08:00
issue DBContext is just a Context (#17100) 2021-09-23 23:45:36 +08:00
lfs Test if LFS object is accessible (#16865) 2021-08-31 14:35:08 +01:00
mailer Always set a unique Message-ID header. (#17206) 2021-10-01 11:24:43 -04:00
mirror Handle broken references in mirror sync (#17013) 2021-10-21 16:45:25 +08:00
pull Fix some lints (#17337) 2021-10-17 20:47:12 +01:00
release DBContext is just a Context (#17100) 2021-09-23 23:45:36 +08:00
repository Fix some lints (#17337) 2021-10-17 20:47:12 +01:00
webhook Add specific event type to header (#17222) 2021-10-05 12:12:17 -05:00
wiki refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00