kenianbei / vcard_parser

Parses and validates vCard data according to RFC 6350 specification.
MIT License
6 stars 3 forks source link

vCard is missing VERSION property #7

Closed tmpfs closed 2 years ago

tmpfs commented 2 years ago

Hey,

Just trying a simple test based on the API documentation:

use anyhow::Result;
use vcard_parser::vcard::Vcard;

fn main() -> Result<()> {
    let text = r#"
    BEGIN:VCARD
    VERSION:4.0
    FN:John Doe
    END:VCARD
    "#;

    let vcard = Vcard::from(text);
    vcard.validate_vcard()?;

    Ok(())
}

And I am getting this error:

Error: vCard is missing `VERSION` property.

Any ideas?

tmpfs commented 2 years ago

The problem is the leading whitespace. Closing as not an issue.