Skip to content

Escaped Quotes Dropping Characters #11

@dashadrick

Description

@dashadrick

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions