Skip to content

gjslint fixes#9

Closed
lightsofapollo wants to merge 2 commits intokewisch:masterfrom
lightsofapollo:gjslint
Closed

gjslint fixes#9
lightsofapollo wants to merge 2 commits intokewisch:masterfrom
lightsofapollo:gjslint

Conversation

@lightsofapollo
Copy link
Copy Markdown
Contributor

tested via validator real tests next!

@lightsofapollo
Copy link
Copy Markdown
Contributor Author

hmm I am going to shelve the full gjslint compliance for now, I will rebase and address the other comments without changing the quotation for now. I don't feel strongly about double quotes (but I do think some linter is a good idea).

@kewisch kewisch closed this Jul 27, 2012
@kewisch
Copy link
Copy Markdown
Owner

kewisch commented Jul 27, 2012

This is going to be replaced by a new PR.

leftmostcat pushed a commit to leftmostcat/ical.js that referenced this pull request Sep 14, 2023
NickCrews pushed a commit to NickCrews/ical.js that referenced this pull request Dec 1, 2025
This commit implements complete support for vCard 2.1 bare TYPE parameters
as specified in RFC 2426 Section 5 (Difference kewisch#9).

Changes Made:
- Added _normalizeVCard21Params() helper function to preprocess parameter strings
- Bare parameters (e.g., TEL;WORK;VOICE) are automatically converted to
  explicit TYPE= format (TEL;TYPE=WORK;TYPE=VOICE) before parsing
- Fixed position tracking after parameter normalization to correctly
  extract property values
- Updated test expectations to reflect proper TYPE array formatting

Implementation Details:
The parser now:
1. Detects when parsing vCard 2.1 content (designSet.name === "vcard21")
2. Normalizes parameter strings by converting bare values to TYPE= format
3. Processes parameters using the existing parameter parser
4. Correctly extracts values from the normalized string

Test Results:
- All tests pass (1028 passing)
- vcard21_type_params.vcf: Tests various bare parameter combinations
- vcard21_comprehensive.vcf: Tests complete vCard 2.1 with bare parameters
- Both vCard 2.1 style (TEL;WORK;VOICE) and vCard 3.0 style
  (TEL;TYPE=WORK;TYPE=VOICE) are now fully supported

Documentation Updates:
- Removed "Parameters Without TYPE= Prefix" from Limited/Unsupported section
- Updated Parameter Support section to indicate full support
- Updated comparison table to show bare TYPE parameters as fully supported
- Updated test file descriptions and recommendations
- Removed bare TYPE parameters from Future Enhancements

This completes the major features needed for vCard 2.1 support. The only
remaining unsupported feature is QUOTED-PRINTABLE encoding, which was
deprecated in vCard 3.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants