Skip to content

Conversation

@risseraka
Copy link
Contributor

Hi @Keyang,

As explained in #318, parsing fails if escape character is specified (and different than "), and a delimiter is between escaped quotes.

A few examples (with option escape='\'):

id,raw 0,"hello,world" // OK raw: hello,world 1,"hello,\"world" // OK raw: hello,"world 2,"hello\",world" // KO raw: hello\" field3: world 3,"\"hello,world\"" // KO raw: "\"hello" field3: world\" 4,"\"hello,\"world\"" // KO raw: "\hello field3: \"world\"" 5,"\"hello\",world\"" // OK raw: "hello",world" 6,"\"hello\",\"world\"" // OK raw: "hello","world" 

With this fix:

0,"hello,world" // OK raw: hello,world 1,"hello,\"world" // OK raw: hello,"world 2,"hello\",world" // OK raw: hello",world 3,"\"hello,world\"" // OK raw: "hello,world" 4,"\"hello,\"world\"" // OK raw: "hello,"world" 5,"\"hello\",world\"" // OK raw: "hello",world" 6,"\"hello\",\"world\"" // OK raw: "hello","world" 

Hope you will review this pull request, as it seems like you haven't maintained the repo since last year.
Great work, by the way.

Cheers,
Adrien.

@coveralls
Copy link

coveralls commented Jun 9, 2019

Pull Request Test Coverage Report for Build 194

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.3%) to 95.423%

Files with Coverage Reduction New Missed Lines %
src/util.ts 1 61.54%
Totals Coverage Status
Change from base Build 190: 0.3%
Covered Lines: 643
Relevant Lines: 660

💛 - Coveralls
@Keyang
Copy link
Owner

Keyang commented Jun 20, 2019

Thanks a million !
Sorry for lack of response. Super busy in the last months.

@Keyang
Copy link
Owner

Keyang commented Jun 20, 2019

LGTM

@Keyang Keyang merged commit 98fe0f3 into Keyang:master Jun 20, 2019
@Keyang Keyang added this to the 2.0.9 milestone Jun 20, 2019
@risseraka
Copy link
Contributor Author

Good hearing back from you.
Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants