githaven-fork/services/gitdiff
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
..
testdata/academic-module Fix panic when diff (#9187) 2019-11-28 17:05:57 +08:00
csv_test.go Properly determine CSV delimiter (#17459) 2021-10-30 23:50:40 +08:00
csv.go Prevent NPE in CSV diff rendering when column removed (#17018) 2021-10-20 20:10:03 +01:00
gitdiff_test.go Add buttons to allow loading of incomplete diffs (#16829) 2021-10-15 17:05:33 +01:00
gitdiff.go Add buttons to allow loading of incomplete diffs (#16829) 2021-10-15 17:05:33 +01:00
main_test.go Move db related basic functions to models/db (#17075) 2021-09-19 19:49:59 +08:00