Skip to content
This repository was archived by the owner on Aug 17, 2024. It is now read-only.
This repository was archived by the owner on Aug 17, 2024. It is now read-only.

vCard property group support #59

@rolisv

Description

@rolisv

Hi @Peltoche

It looks like property groups are not supported.

From the spec https://www.rfc-editor.org/rfc/rfc6350#section-3.3 on page 6:

...
   contentline = [group "."] name *(";" param) ":" value CRLF
...
   group = 1*(ALPHA / DIGIT / "-")
...

And then page 7:

The group construct is used to group related properties together.
The group name is a syntactic convention used to indicate that all
property names prefaced with the same group name SHOULD be grouped
together when displayed by an application. It has no other
significance. Implementations that do not understand or support
grouping MAY simply strip off any text before a "." to the left of
the type name and present the types and values as normal.

So having vCard property line:

gr1.FN:Bob

The expectation would be something like:

let p = vcard.get_property("FN").unwrap();
assert_eq!(p.name, "FN");
assert_eq!(p.group, Some("gr1"));

IMHO, the key point here is that the property name should be "FN" and not "gr1.FN".

Is this functionality being considered? I could submit a PR.

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions