forgejo/routers
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
..
api/v1 Ensure that restricted users can access repos for which they are members (#17460) 2021-10-28 10:54:40 +08:00
common Rename db Engines related functions (#17481) 2021-10-30 22:32:11 +08:00
install Rename db Engines related functions (#17481) 2021-10-30 22:32:11 +08:00
private Prevent panic in serv.go with Deploy Keys (#17434) 2021-10-26 01:24:19 +02:00
utils just add some unit tests (#16291) 2021-06-29 22:00:02 +01:00
web Properly determine CSV delimiter (#17459) 2021-10-30 23:50:40 +08:00
init.go Sync gitea app path for git hooks and authorized keys when starting (#17335) 2021-10-21 17:22:43 +08:00