brewster / vcardigan

Ruby vCard Builder/Parser
MIT License
71 stars 23 forks source link

Some versions of Outlook generate using lowercase fields, causing the record to be skipped. #16

Open bnlucas opened 8 years ago

bnlucas commented 8 years ago

Some versions of Outlook generate the vCard file using lowercase fields, version: instead of VERSION: which causes vCardigan.parse to not find any fields.

https://github.com/brewster/vcardigan/blob/master/lib/vcardigan/vcard.rb#L32

begin:vcard
version:3.0
prodid:Microsoft-MacOutlook/f.1b.0.161010
...
end:vcard
bnlucas commented 8 years ago

Found that changing begin:vcard to BEGIN:VCARD and and end:vcard to END:VCARD works.

https://github.com/brewster/vcardigan/blob/master/lib/vcardigan/vcard.rb#L183