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

Try unix line breaks \n if windows does not give results #44

Closed
muuvmuuv opened this issue Dec 7, 2021 · 1 comment
Closed

Try unix line breaks \n if windows does not give results #44

muuvmuuv opened this issue Dec 7, 2021 · 1 comment

Comments

@muuvmuuv
Copy link

muuvmuuv commented Dec 7, 2021

Just noticed that if a vCard uses \n for line breaks vcf returns and undefined version match error. This can happen. A workaround would be a check after the first normalize split:

https://github.com/jhermsmeier/node-vcf/blob/master/lib/vcard.js#L263

if (lines.length <= 1) {
        lines = lines[0].split(/\n/g);
      }
@jhermsmeier
Copy link
Owner

VCF specifies CRLF line endings; see #35 (comment) for a little more detail (tldr; it would break quoted printable encoding in values)

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