jens-maus / node-ical

NodeJS class for parsing iCalendar/ICS files
Apache License 2.0
118 stars 50 forks source link

Fix double quote parsing error #332

Closed scootermon closed 3 weeks ago

scootermon commented 3 weeks ago

indexOf returns -1 when not found, which is a truthy value. This results in quotes getting stripped from every single line, which then causes an issue if the previously quoted string contained a colon.

Fixes #326

jens-maus commented 3 weeks ago

Please add test cases accordingly to get this PR accepted/integrated..

jens-maus commented 3 weeks ago

Thanks for integrating a test unit for this PR! However, what about using the exact ics string from the corresponding issue #326 in your unit test? IMHO it would be more precise to use the exact same ics to verify that #326 is really fixed.

scootermon commented 3 weeks ago

That's fair, I updated the test to match the example provided in the issue.