Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle parameter values with multiple entries #702

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

onny
Copy link

@onny onny commented Jun 12, 2024

Fixing parser for quoted multi-value parameters. The PR fixes the string length detection of this parameter in case if it's not a simple single string but an array.

attendee = ICAL.Property.fromString(
  'ATTENDEE;MEMBER="mailto:mygroup@localhost","mailto:mygroup2@localhost":mailto:user2@localhost'
);
console.log(attendee);

Will now correctly return the attendee URI mailto:user2@localhost

Fixes #634

Copy link
Owner

@kewisch kewisch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking a stab at this! Parsing is one of the paths that I'd like to keep optimized as much as JS makes it possible, I'd appreciate if you could take a look at the following comments. Let me know if you have any questions!

lib/ical/parse.js Show resolved Hide resolved
test/failure_test.js Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jun 14, 2024

Pull Request Test Coverage Report for Build 9484426386

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 98.164%

Totals Coverage Status
Change from base Build 9390039473: 0.002%
Covered Lines: 9369
Relevant Lines: 9530

💛 - Coveralls

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.

Fails to parse COMMA-separated list of calendar addresses in quoted-strings (e.g. MEMBER parameter)
4 participants