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

Version 2.0.6 fails to parse vcard files created by 2.0.4 #34

Closed
rbeeger opened this issue Oct 7, 2019 · 3 comments
Closed

Version 2.0.6 fails to parse vcard files created by 2.0.4 #34

rbeeger opened this issue Oct 7, 2019 · 3 comments

Comments

@rbeeger
Copy link

rbeeger commented Oct 7, 2019

2.0.6 fixed the bug introduced in 2.0.5 that prevented it from parsing its own output.
But 2.0.6 fails to parse its own output generated by version 2.0.4

2.0.4 on the other hand is able to parse output from versions 2.0.4, 2.0.5 and 2.0.6

@jhermsmeier
Copy link
Owner

Well, issue #33 has been around since v1.0.0 judging by git blame, and since LF delimited VCF is technically malformed, I'm not sure what you'd like to change?

@rbeeger
Copy link
Author

rbeeger commented Oct 8, 2019

It's totally fine that 2.0.6 fixes the output to be wellformed, but it should still be able to parse output generated by an earlier version even if it is now considered to be malformed.

And it's a patch level update. Patch updates shouldn't break that kind of thing.

@jhermsmeier
Copy link
Owner

And it's a patch level update. Patch updates shouldn't break that kind of thing.

Patches fix bugs. This was a bug, not an API change. Sorry it broke something, but that broken something is likely broken for most other things that parse VCF as well.
I agree that this is very unfortunate breakage, but given that the bug has been around for that long and nobody had complained about it, I figured patch level would be fine.

but it should still be able to parse output generated by an earlier version even if it is now considered to be malformed.

The issue with that is that it would break multi-line fields (i.e. some quoted-printable encoded data, see #31 for an example) or other line-folded values. If you know that you don't have line-folded values in your vCards, you could treat them with .replace( /\n/g, '\r\n' ) before parsing though.

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

2 participants