Closed Cyrix126 closed 1 year ago
Hi, this is not obvious in the doc, but this method only works for single properties. For properties that have multiple cardinality like email, tel, you have to use get_properties_by_type.
I'm thinking about completely reworking how properties are matched, to more closely follow the spec, see https://github.com/kenianbei/vcard_parser/issues/8. I'll keep this issue open for now to discuss a better way to get properties from the vcard.
ok, thanks for clearing that up.
I encounter an issue where
get_property_by_type
doesn't find the property for some types (tested on Email, Tel, Lang).For example this code:
Will compile but if ran it will panic because
thread 'main' panicked at 'called Option::unwrap() on a None value', src/main.rs:7:66
get_property_by_type
return None where it should return the property just added. Theadd_property
works, if I return vcard as a string, I can see the new property. But for some reason theget_property_by_type
can't retrieve it.