You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BEGIN:VCARD
VERSION:3.0
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;VALUE=URL;TYPE=GIF:http://www.example.com/dir_photos/my_photo.gif
TEL;TYPE=WORK,VOICE:(111) 555-1212
TEL;TYPE=HOME,VOICE:(404) 555-1212
ADR;TYPE=WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;TYPE=WORK:100 Waters Edge\nBaytown, LA 30314\nUnited States of America
ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;TYPE=HOME:42 Plantation St.\nBaytown, LA 30314\nUnited States of America
EMAIL;TYPE=PREF,INTERNET:[email protected]
REV:2008-04-24T19:52:43Z
END:VCARD
(Note the extra newline between ADR and LABEL). But when we serialize it back to vcard and try loading:
1.9.3-p385 :154 > VCardigan.parseVCardigan.parse(card3).to_sNoMethodError: undefinedmethod`split' for nil:NilClass from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/vcardigan-0.0.2/lib/vcardigan/property.rb:67:in `parse' from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/vcardigan-0.0.2/lib/vcardigan/vcard.rb:34:in `block in parse'from/usr/local/rvm/gems/ruby-1.9.3-p385/gems/vcardigan-0.0.2/lib/vcardigan/vcard.rb:33:in`each_line' from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/vcardigan-0.0.2/lib/vcardigan/vcard.rb:33:in `parse' from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/vcardigan-0.0.2/lib/vcardigan.rb:16:in `parse'from(irb):154from/usr/local/rvm/rubies/ruby-1.9.3-p385/bin/irb:16:in `<main>'
Loads fine once we remove that newline
1.9.3-p385 :156 > VCardigan.parseVCardigan.parse(card3).to_s.gsub("\n\n","\n")# output omitted, no exceptions raised
The text was updated successfully, but these errors were encountered:
Let's take a sample card from Wikipedia on vCard:
It loads fine:
(Note the extra newline between ADR and LABEL). But when we serialize it back to vcard and try loading:
Loads fine once we remove that newline
The text was updated successfully, but these errors were encountered: