diff options
author | Richard Mahn <richmahn@users.noreply.github.com> | 2021-10-30 09:50:40 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-30 23:50:40 +0800 |
commit | 40c8451b7d68614cc5d971cd148df503e7c00647 (patch) | |
tree | 83ce2c66ea9909decb692b3d4a5cf7c8ce2c6f10 /custom | |
parent | 63c0dc89ef96a2e38b38aa6cba5e4e8d1d7b9150 (diff) | |
download | gitea-40c8451b7d68614cc5d971cd148df503e7c00647.tar.gz gitea-40c8451b7d68614cc5d971cd148df503e7c00647.zip |
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>
Diffstat (limited to 'custom')
0 files changed, 0 insertions, 0 deletions