Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escaped Quotes Dropping Characters #11

Open
dashadrick opened this issue Aug 7, 2019 · 0 comments
Open

Escaped Quotes Dropping Characters #11

dashadrick opened this issue Aug 7, 2019 · 0 comments

Comments

@dashadrick
Copy link

dashadrick commented Aug 7, 2019

Characters are lost when parsing a slightly modified version of your test data:

let data = """ first name,last_name,age,gender,tagLine TinTin,,16,M,"=HYPERLINK(""https://en.wikipedia.org/wiki/The_Great_Snake"",""Great snakes!"")" """

CSV produces the following when processing the last field:
Source:
=HYPERLINK(""https://en.wikipedia.org/wiki/The_Great_Snake"",""Great snakes!"")
Parsed Result:
=HYPERLINK("https://en.wikipedia.org/wiki/The_Great_Snak""Great snakes"

its missing the 'e' in Snake, the ',' after Snake", the '!' and the '")" at the end:

I updated the cellDelimiter processing line 128 in Parser.swift with the following:

case true: index += 1; slice.end += 1

The test that failed with the above data now passes and with an update of the test data all your other tests pass as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant